Commit 7b7083b7828104d8a0e73a09647a236f1c2bc3cf
1 parent
394ec6d8
Exists in
master
and in
23 other branches
ActionItem154: testing response before testing contents
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1186 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
10 additions
and
9 deletions
Show diff stats
test/integration/manage_documents_test.rb
| ... | ... | @@ -8,16 +8,18 @@ class ManageDocumentsTest < ActionController::IntegrationTest |
| 8 | 8 | create_user('myuser') |
| 9 | 9 | |
| 10 | 10 | login('myuser', 'myuser') |
| 11 | - | |
| 12 | 11 | assert_tag :tag => 'a', :attributes => { :href => '/myprofile/myuser' } |
| 12 | + | |
| 13 | 13 | get '/myprofile/myuser' |
| 14 | - | |
| 14 | + assert_response :success | |
| 15 | 15 | assert_tag :tag => 'a', :attributes => { :href => '/myprofile/myuser/cms' } |
| 16 | - get '/myprofile/myuser/cms/new' | |
| 17 | 16 | |
| 17 | + get '/myprofile/myuser/cms/new' | |
| 18 | + assert_response :success | |
| 18 | 19 | assert_tag :tag => 'a', :attributes => { :href => '/myprofile/myuser/cms/new?type=TinyMceArticle' } |
| 19 | - get '/myprofile/myuser/cms/new?type=TinyMceArticle' | |
| 20 | 20 | |
| 21 | + get '/myprofile/myuser/cms/new?type=TinyMceArticle' | |
| 22 | + assert_response :success | |
| 21 | 23 | assert_tag :tag => 'form', :attributes => { :action => '/myprofile/myuser/cms/new', :method => /post/i } |
| 22 | 24 | |
| 23 | 25 | assert_difference Article, :count do |
| ... | ... | @@ -36,23 +38,22 @@ class ManageDocumentsTest < ActionController::IntegrationTest |
| 36 | 38 | article.save! |
| 37 | 39 | |
| 38 | 40 | login('myuser', 'myuser') |
| 39 | - | |
| 40 | 41 | assert_tag :tag => 'a', :attributes => { :href => '/myprofile/myuser' } |
| 42 | + | |
| 41 | 43 | get '/myprofile/myuser' |
| 42 | 44 | assert_response :success |
| 43 | - | |
| 44 | 45 | assert_tag :tag => 'a', :attributes => { :href => '/myprofile/myuser/cms' } |
| 46 | + | |
| 45 | 47 | get '/myprofile/myuser/cms' |
| 46 | 48 | assert_response :success |
| 47 | - | |
| 48 | 49 | assert_tag :tag => 'a', :attributes => { :href => "/myprofile/myuser/cms/view/#{article.id}"} |
| 50 | + | |
| 49 | 51 | get "/myprofile/myuser/cms/view/#{article.id}" |
| 50 | 52 | assert_response :success |
| 51 | - | |
| 52 | 53 | assert_tag :tag => 'a', :attributes => { :href => "/myprofile/myuser/cms/edit/#{article.id}"} |
| 54 | + | |
| 53 | 55 | get "/myprofile/myuser/cms/edit/#{article.id}" |
| 54 | 56 | assert_response :success |
| 55 | - | |
| 56 | 57 | assert_tag :tag => 'form', :attributes => { :action => "/myprofile/myuser/cms/edit/#{article.id}", :method => /post/i } |
| 57 | 58 | |
| 58 | 59 | assert_no_difference Article, :count do | ... | ... |