Commit 99c63eb0467f75186a610125bae761102a39c073
1 parent
89b9b4d9
Exists in
staging
and in
41 other branches
fixing unit tests
Showing
3 changed files
with
3 additions
and
0 deletions
Show diff stats
test/unit/article_test.rb
@@ -913,6 +913,7 @@ class ArticleTest < ActiveSupport::TestCase | @@ -913,6 +913,7 @@ class ArticleTest < ActiveSupport::TestCase | ||
913 | should 'not doubly escape quotes in the name' do | 913 | should 'not doubly escape quotes in the name' do |
914 | person = fast_create(Person) | 914 | person = fast_create(Person) |
915 | community = fast_create(Community) | 915 | community = fast_create(Community) |
916 | + community.add_member(profile) | ||
916 | article = fast_create(Article, :name => 'article name', :profile_id => person.id) | 917 | article = fast_create(Article, :name => 'article name', :profile_id => person.id) |
917 | a = create(ApproveArticle, :article => article, :target => community, :requestor => profile) | 918 | a = create(ApproveArticle, :article => article, :target => community, :requestor => profile) |
918 | a.finish | 919 | a.finish |
test/unit/folder_test.rb
@@ -93,6 +93,7 @@ class FolderTest < ActiveSupport::TestCase | @@ -93,6 +93,7 @@ class FolderTest < ActiveSupport::TestCase | ||
93 | image = UploadedFile.create!(:profile => person, :uploaded_data => fixture_file_upload('/files/rails.png', 'image/png')) | 93 | image = UploadedFile.create!(:profile => person, :uploaded_data => fixture_file_upload('/files/rails.png', 'image/png')) |
94 | 94 | ||
95 | community = fast_create(Community) | 95 | community = fast_create(Community) |
96 | + community.add_member(person) | ||
96 | folder = fast_create(Folder, :profile_id => community.id) | 97 | folder = fast_create(Folder, :profile_id => community.id) |
97 | a = create(ApproveArticle, :article => image, :target => community, :requestor => person, :article_parent => folder) | 98 | a = create(ApproveArticle, :article => image, :target => community, :requestor => person, :article_parent => folder) |
98 | a.finish | 99 | a.finish |
test/unit/gallery_test.rb
@@ -101,6 +101,7 @@ class GalleryTest < ActiveSupport::TestCase | @@ -101,6 +101,7 @@ class GalleryTest < ActiveSupport::TestCase | ||
101 | i = UploadedFile.create!(:profile => p, :uploaded_data => fixture_file_upload('/files/rails.png', 'image/png')) | 101 | i = UploadedFile.create!(:profile => p, :uploaded_data => fixture_file_upload('/files/rails.png', 'image/png')) |
102 | 102 | ||
103 | c = fast_create(Community) | 103 | c = fast_create(Community) |
104 | + c.add_member(p) | ||
104 | gallery = fast_create(Gallery, :profile_id => c.id) | 105 | gallery = fast_create(Gallery, :profile_id => c.id) |
105 | 106 | ||
106 | a = create(ApproveArticle, :article => i, :target => c, :requestor => p, :article_parent => gallery) | 107 | a = create(ApproveArticle, :article => i, :target => c, :requestor => p, :article_parent => gallery) |