From 272250bfebf33d14e050efe4d90331f0fb0bd6c9 Mon Sep 17 00:00:00 2001 From: Leandro Nunes dos Santos Date: Sun, 21 Jun 2009 20:53:21 -0300 Subject: [PATCH] fixing migration bug on contact controller --- test/functional/contact_controller_test.rb | 2 ++ 1 file changed, 2 insertions(+), 0 deletions(-) diff --git a/test/functional/contact_controller_test.rb b/test/functional/contact_controller_test.rb index 377692d..bf8c196 100644 --- a/test/functional/contact_controller_test.rb +++ b/test/functional/contact_controller_test.rb @@ -62,7 +62,9 @@ class ContactControllerTest < Test::Unit::TestCase end should 'define city and state' do + City.stubs(:exists?).returns(true) City.stubs(:find).returns(City.new(:name => 'Camaçari')) + State.stubs(:exists?).returns(true) State.stubs(:find).returns(State.new(:name => 'Bahia')) post :new, :profile => enterprise.identifier, :contact => {:name => 'john', :subject => 'Hi', :email => 'visitor@mail.invalid', :message => 'Hi, all'}, :state => '1', :city => '1' assert_equal 'Camaçari', assigns(:contact).city -- libgit2 0.21.2