Commit 272250bfebf33d14e050efe4d90331f0fb0bd6c9
Committed by
Antonio Terceiro
1 parent
54b5de78
Exists in
master
and in
29 other branches
fixing migration bug on contact controller
Showing
1 changed file
with
2 additions
and
0 deletions
Show diff stats
test/functional/contact_controller_test.rb
@@ -62,7 +62,9 @@ class ContactControllerTest < Test::Unit::TestCase | @@ -62,7 +62,9 @@ class ContactControllerTest < Test::Unit::TestCase | ||
62 | end | 62 | end |
63 | 63 | ||
64 | should 'define city and state' do | 64 | should 'define city and state' do |
65 | + City.stubs(:exists?).returns(true) | ||
65 | City.stubs(:find).returns(City.new(:name => 'Camaçari')) | 66 | City.stubs(:find).returns(City.new(:name => 'Camaçari')) |
67 | + State.stubs(:exists?).returns(true) | ||
66 | State.stubs(:find).returns(State.new(:name => 'Bahia')) | 68 | State.stubs(:find).returns(State.new(:name => 'Bahia')) |
67 | post :new, :profile => enterprise.identifier, :contact => {:name => 'john', :subject => 'Hi', :email => 'visitor@mail.invalid', :message => 'Hi, all'}, :state => '1', :city => '1' | 69 | post :new, :profile => enterprise.identifier, :contact => {:name => 'john', :subject => 'Hi', :email => 'visitor@mail.invalid', :message => 'Hi, all'}, :state => '1', :city => '1' |
68 | assert_equal 'Camaçari', assigns(:contact).city | 70 | assert_equal 'Camaçari', assigns(:contact).city |