Commit 3eb27b6f990039a554ba42037e79b44f3ada938b
1 parent
f35ac46d
Exists in
master
and in
28 other branches
article-version: implemented tests
AI2822
Showing
1 changed file
with
6 additions
and
5 deletions
Show diff stats
test/functional/content_viewer_controller_test.rb
... | ... | @@ -398,14 +398,15 @@ class ContentViewerControllerTest < ActionController::TestCase |
398 | 398 | assert_tag :tag => 'div', :attributes => { :class => /article-body/ }, :content => /edited article/ |
399 | 399 | end |
400 | 400 | |
401 | - should 'display differences between article version' do | |
401 | + should "display differences between article's versions" do | |
402 | 402 | page = TextArticle.create!(:name => 'myarticle', :body => 'original article', :display_versions => true, :profile => profile) |
403 | 403 | page.body = 'edited article'; page.save |
404 | 404 | |
405 | - get :versions_diff, :profile => profile.identifier, :page => [ 'myarticle' ], :version => 1 | |
406 | - | |
407 | - assert_tag :tag => 'div', :attributes => { :class => /article/ }, :content => /edited article/ | |
408 | - | |
405 | + get :versions_diff, :profile => profile.identifier, :page => [ 'myarticle' ], :v1 => 1, :v2 => 2; | |
406 | + | |
407 | + assert_tag :tag => 'li', :attributes => { :class => /del/ }, :content => /original article/ | |
408 | + assert_tag :tag => 'li', :attributes => { :class => /ins/ }, :content => /edited article/ | |
409 | + assert_response :success | |
409 | 410 | end |
410 | 411 | |
411 | 412 | should 'not return an article of a different user' do | ... | ... |