diff --git a/test/functional/cms_controller_test.rb b/test/functional/cms_controller_test.rb index d684326..d56b1ff 100644 --- a/test/functional/cms_controller_test.rb +++ b/test/functional/cms_controller_test.rb @@ -1223,7 +1223,7 @@ class CmsControllerTest < ActionController::TestCase should 'not allow user edit article if he is owner but has no publish permission' do c = Community.create!(:name => 'test_comm', :identifier => 'test_comm') u = create_user_with_permission('test_user', 'bogus_permission', c) - a = c.articles.create!(:name => 'test_article', :last_changed_by => u) + a = c.articles.create!(:name => 'test_article', :author => u) login_as :test_user get :edit, :profile => c.identifier, :id => a.id @@ -1234,7 +1234,7 @@ class CmsControllerTest < ActionController::TestCase should 'allow user edit article if he is owner and has publish permission' do c = Community.create!(:name => 'test_comm', :identifier => 'test_comm') u = create_user_with_permission('test_user', 'publish_content', c) - a = c.articles.create!(:name => 'test_article', :last_changed_by => u) + a = c.articles.create!(:name => 'test_article', :author => u) login_as :test_user @controller.stubs(:user).returns(u) diff --git a/test/functional/comment_controller_test.rb b/test/functional/comment_controller_test.rb index b408030..940ad19 100644 --- a/test/functional/comment_controller_test.rb +++ b/test/functional/comment_controller_test.rb @@ -266,7 +266,7 @@ class CommentControllerTest < ActionController::TestCase should 'not create ApproveComment task when the comment author is the same of article author' do login_as @profile.identifier community = Community.create!(:name => 'testcomm') - page = community.articles.create!(:name => 'myarticle', :moderate_comments => true, :last_changed_by => @profile) + page = community.articles.create!(:name => 'myarticle', :moderate_comments => true, :author => @profile) community.add_moderator(@profile) assert_no_difference ApproveComment, :count do diff --git a/test/unit/forum_helper_test.rb b/test/unit/forum_helper_test.rb index aa55bec..7fcc8ca 100644 --- a/test/unit/forum_helper_test.rb +++ b/test/unit/forum_helper_test.rb @@ -29,16 +29,16 @@ class ForumHelperTest < ActiveSupport::TestCase end should 'list posts with different classes' do - forum.children << older_post = TextileArticle.create!(:name => 'First post', :profile => profile, :parent => forum, :published => false, :last_changed_by => profile) + forum.children << older_post = TextileArticle.create!(:name => 'First post', :profile => profile, :parent => forum, :published => false, :author => profile) one_month_later = Time.now + 1.month Time.stubs(:now).returns(one_month_later) - forum.children << newer_post = TextileArticle.create!(:name => 'Second post', :profile => profile, :parent => forum, :published => true, :last_changed_by => profile) + forum.children << newer_post = TextileArticle.create!(:name => 'Second post', :profile => profile, :parent => forum, :published => true, :author => profile) assert_match /forum-post position-1 first odd-post.*forum-post position-2 last not-published even-post/, list_forum_posts(forum.posts) end should 'return post update if it has no comments' do author = create_user('forum test author').person - some_post = TextileArticle.create!(:name => 'First post', :profile => profile, :parent => forum, :published => true, :last_changed_by => author) + some_post = TextileArticle.create!(:name => 'First post', :profile => profile, :parent => forum, :published => true, :author => author) assert some_post.comments.empty? out = last_topic_update(some_post) assert_match some_post.updated_at.to_s, out -- libgit2 0.21.2