Commit 5bf571f1ede4f14142051c9b8ae32314c5ff46c1
1 parent
257732f2
Exists in
staging
and in
42 other branches
Fix tests
(ActionItem1303)
Showing
3 changed files
with
6 additions
and
6 deletions
Show diff stats
features/contact.feature
| ... | ... | @@ -14,7 +14,7 @@ In order to ask questions and solve problems |
| 14 | 14 | |
| 15 | 15 | Scenario: without states |
| 16 | 16 | Given I am on Sample Community's homepage |
| 17 | - When I follow "Send a message" | |
| 17 | + When I follow "Send an e-mail" | |
| 18 | 18 | Then I should not see "City and state" |
| 19 | 19 | |
| 20 | 20 | Scenario: with states |
| ... | ... | @@ -22,6 +22,6 @@ In order to ask questions and solve problems |
| 22 | 22 | | name | |
| 23 | 23 | | Bahia | |
| 24 | 24 | And I am on Sample Community's homepage |
| 25 | - When I follow "Send a message" | |
| 25 | + When I follow "Send an e-mail" | |
| 26 | 26 | Then I should see "City and state" |
| 27 | 27 | ... | ... |
test/functional/contact_controller_test.rb
| ... | ... | @@ -27,7 +27,7 @@ class ContactControllerTest < Test::Unit::TestCase |
| 27 | 27 | |
| 28 | 28 | should 'display destinatary name in title' do |
| 29 | 29 | get :new, :profile => enterprise.identifier |
| 30 | - assert_tag :tag => 'h1', :content => "Send a message to #{enterprise.name}" | |
| 30 | + assert_tag :tag => 'h1', :content => /Send.*#{enterprise.name}/ | |
| 31 | 31 | end |
| 32 | 32 | |
| 33 | 33 | should 'add form to create contact via post' do | ... | ... |
test/functional/profile_controller_test.rb
| ... | ... | @@ -337,19 +337,19 @@ class ProfileControllerTest < Test::Unit::TestCase |
| 337 | 337 | should 'display contact us for enterprises' do |
| 338 | 338 | ent = Enterprise.create!(:name => 'my test enterprise', :identifier => 'my-test-enterprise') |
| 339 | 339 | get :index, :profile => 'my-test-enterprise' |
| 340 | - assert_tag :tag => 'a', :attributes => { :href => "/contact/my-test-enterprise/new" }, :content => 'Send a message' | |
| 340 | + assert_tag :tag => 'a', :attributes => { :href => "/contact/my-test-enterprise/new" }, :content => /Send/ | |
| 341 | 341 | end |
| 342 | 342 | |
| 343 | 343 | should 'not display contact us for non-enterprises' do |
| 344 | 344 | get :index, :profile => @profile.identifier |
| 345 | - assert_no_tag :tag => 'a', :attributes => { :href => "/contact/#{@profile.identifier}/new" }, :content => 'Send a message' | |
| 345 | + assert_no_tag :tag => 'a', :attributes => { :href => "/contact/#{@profile.identifier}/new" }, :content => /Send/ | |
| 346 | 346 | end |
| 347 | 347 | |
| 348 | 348 | should 'display contact us only if enabled' do |
| 349 | 349 | ent = fast_create(Enterprise, :name => 'my test enterprise', :identifier => 'my-test-enterprise') |
| 350 | 350 | ent.update_attribute(:enable_contact_us, false) |
| 351 | 351 | get :index, :profile => 'my-test-enterprise' |
| 352 | - assert_no_tag :tag => 'a', :attributes => { :href => "/contact/my-test-enterprise/new" }, :content => 'Send a message' | |
| 352 | + assert_no_tag :tag => 'a', :attributes => { :href => "/contact/my-test-enterprise/new" }, :content => /Send/ | |
| 353 | 353 | end |
| 354 | 354 | |
| 355 | 355 | should 'display contact button only if friends' do | ... | ... |