From 7fac67da0b74e03e62c7afb7a9c5da470a38d909 Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Fri, 30 Nov 2007 21:42:56 +0000 Subject: [PATCH] ActionItem21: testing attribution of "last changed by" on article creation --- test/functional/cms_controller_test.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/functional/cms_controller_test.rb b/test/functional/cms_controller_test.rb index 5d3a6e7..dd81e2c 100644 --- a/test/functional/cms_controller_test.rb +++ b/test/functional/cms_controller_test.rb @@ -81,7 +81,13 @@ class CmsControllerTest < Test::Unit::TestCase end should 'set last_changed_by when creating article' do - flunk 'pending' + login_as(profile.identifier) + + post :new, :profile => profile.identifier, :article => { :name => 'changed by me', :body => 'content ...' } + + a = profile.articles.find_by_path('changed-by-me') + assert_not_nil a + assert_equal profile, a.last_changed_by end should 'set last_changed_by when updating article' do -- libgit2 0.21.2