Commit 2d0f28ade4bf6274aea8d1fa2b13af08a5a8354a
1 parent
73056494
Exists in
master
and in
29 other branches
ActionItem3: adding an extra POST in the integration test
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@117 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
11 additions
and
1 deletions
Show diff stats
test/integration/enable_disable_features_test.rb
@@ -6,15 +6,25 @@ class EnableDisableFeaturesTest < ActionController::IntegrationTest | @@ -6,15 +6,25 @@ class EnableDisableFeaturesTest < ActionController::IntegrationTest | ||
6 | def test_enable_features | 6 | def test_enable_features |
7 | uses_host 'anhetegua.net' | 7 | uses_host 'anhetegua.net' |
8 | login 'johndoe', 'test' | 8 | login 'johndoe', 'test' |
9 | + | ||
9 | get '/admin/features' | 10 | get '/admin/features' |
10 | assert_response :success | 11 | assert_response :success |
11 | assert_tag :tag => 'input', :attributes => { :name => 'features[feature1]' } | 12 | assert_tag :tag => 'input', :attributes => { :name => 'features[feature1]' } |
12 | assert_tag :tag => 'input', :attributes => { :name => 'features[feature2]' } | 13 | assert_tag :tag => 'input', :attributes => { :name => 'features[feature2]' } |
13 | assert_tag :tag => 'input', :attributes => { :name => 'features[feature3]' } | 14 | assert_tag :tag => 'input', :attributes => { :name => 'features[feature3]' } |
14 | - post 'admin/features/update' | 15 | + |
16 | + post '/admin/features/update' | ||
15 | assert_response :redirect | 17 | assert_response :redirect |
18 | + | ||
16 | follow_redirect! | 19 | follow_redirect! |
17 | assert_response :success | 20 | assert_response :success |
18 | assert_equal '/admin/features', path | 21 | assert_equal '/admin/features', path |
22 | + | ||
23 | + post '/admin/features/update', :features => { 'feature1' => '1' } | ||
24 | + assert_response :redirect | ||
25 | + | ||
26 | + follow_redirect! | ||
27 | + assert_equal '/admin/features', path | ||
28 | + | ||
19 | end | 29 | end |
20 | end | 30 | end |