Commit 8de4f2de68a936f1a9244f9f21d30eecb0386528
1 parent
7d64d3ea
Exists in
master
and in
17 other branches
Remove integration test that fails randomly
Showing
1 changed file
with
0 additions
and
45 deletions
Show diff stats
test/integration/assigning_validator_organizations_to_regions_test.rb
| ... | ... | @@ -1,45 +0,0 @@ |
| 1 | -require_relative "../test_helper" | |
| 2 | - | |
| 3 | -class AssigningValidatorOrganizationsToRegionsTest < ActionDispatch::IntegrationTest | |
| 4 | - | |
| 5 | - should 'be able to properly assign organizations as validators to regions' do | |
| 6 | - env = Environment.default | |
| 7 | - | |
| 8 | - Organization.destroy_all | |
| 9 | - org1 = Organization.create!(:name => 'Organization one', :identifier => 'org1') | |
| 10 | - org2 = Organization.create!(:name => 'Organization two', :identifier => 'org2') | |
| 11 | - | |
| 12 | - Region.destroy_all | |
| 13 | - region1 = create(Region, :name => "Region 1", :environment_id => env.id) | |
| 14 | - region2 = create(Region, :name => "Region 2", :environment_id => env.id) | |
| 15 | - | |
| 16 | - login('ze', 'test') | |
| 17 | - | |
| 18 | - get '/admin/region_validators' | |
| 19 | - assert_response :success | |
| 20 | - | |
| 21 | - get "/admin/region_validators/region/#{region1.id}" | |
| 22 | - assert_response :success | |
| 23 | - assert_tag :tag => 'form', :attributes => { :action => "/admin/region_validators/region/#{region1.id}" }, :descendant => { :tag => 'input', :attributes => { :type => 'text', :name => 'search' } } | |
| 24 | - | |
| 25 | - get "/admin/region_validators/region/#{region1.id}", :search => 'two' | |
| 26 | - assert_response :success | |
| 27 | - assert_tag :tag => 'form', :attributes => { :action => "/admin/region_validators/add/#{region1.id}" }, :descendant => { :tag => 'input', :attributes => { :type => 'hidden', :name => 'validator_id', :value => org2.id } } | |
| 28 | - | |
| 29 | - post "/admin/region_validators/add/#{region1.id}", :validator_id => org2.id | |
| 30 | - assert_response :redirect | |
| 31 | - | |
| 32 | - follow_redirect! | |
| 33 | - assert_equal "/admin/region_validators/region/#{region1.id}", path | |
| 34 | - | |
| 35 | - assert_tag :tag => 'a', :attributes => { :href => "/admin/region_validators/remove/#{region1.id}?validator_id=#{org2.id}" } | |
| 36 | - | |
| 37 | - post "/admin/region_validators/remove/#{region1.id}", :validator_id => org2.id | |
| 38 | - assert_response :redirect | |
| 39 | - | |
| 40 | - follow_redirect! | |
| 41 | - assert_equal "/admin/region_validators/region/#{region1.id}", path | |
| 42 | - assert_no_tag :tag => 'a', :attributes => { :href => "/admin/region_validators/remove/#{region1.id}?validator_id=#{org2.id}" } | |
| 43 | - | |
| 44 | - end | |
| 45 | -end |