Commit 5bf571f1ede4f14142051c9b8ae32314c5ff46c1
1 parent
257732f2
Exists in
master
and in
28 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,7 +14,7 @@ In order to ask questions and solve problems | ||
14 | 14 | ||
15 | Scenario: without states | 15 | Scenario: without states |
16 | Given I am on Sample Community's homepage | 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 | Then I should not see "City and state" | 18 | Then I should not see "City and state" |
19 | 19 | ||
20 | Scenario: with states | 20 | Scenario: with states |
@@ -22,6 +22,6 @@ In order to ask questions and solve problems | @@ -22,6 +22,6 @@ In order to ask questions and solve problems | ||
22 | | name | | 22 | | name | |
23 | | Bahia | | 23 | | Bahia | |
24 | And I am on Sample Community's homepage | 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 | Then I should see "City and state" | 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,7 +27,7 @@ class ContactControllerTest < Test::Unit::TestCase | ||
27 | 27 | ||
28 | should 'display destinatary name in title' do | 28 | should 'display destinatary name in title' do |
29 | get :new, :profile => enterprise.identifier | 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 | end | 31 | end |
32 | 32 | ||
33 | should 'add form to create contact via post' do | 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,19 +337,19 @@ class ProfileControllerTest < Test::Unit::TestCase | ||
337 | should 'display contact us for enterprises' do | 337 | should 'display contact us for enterprises' do |
338 | ent = Enterprise.create!(:name => 'my test enterprise', :identifier => 'my-test-enterprise') | 338 | ent = Enterprise.create!(:name => 'my test enterprise', :identifier => 'my-test-enterprise') |
339 | get :index, :profile => 'my-test-enterprise' | 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 | end | 341 | end |
342 | 342 | ||
343 | should 'not display contact us for non-enterprises' do | 343 | should 'not display contact us for non-enterprises' do |
344 | get :index, :profile => @profile.identifier | 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 | end | 346 | end |
347 | 347 | ||
348 | should 'display contact us only if enabled' do | 348 | should 'display contact us only if enabled' do |
349 | ent = fast_create(Enterprise, :name => 'my test enterprise', :identifier => 'my-test-enterprise') | 349 | ent = fast_create(Enterprise, :name => 'my test enterprise', :identifier => 'my-test-enterprise') |
350 | ent.update_attribute(:enable_contact_us, false) | 350 | ent.update_attribute(:enable_contact_us, false) |
351 | get :index, :profile => 'my-test-enterprise' | 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 | end | 353 | end |
354 | 354 | ||
355 | should 'display contact button only if friends' do | 355 | should 'display contact button only if friends' do |