test/dummy/spec/functional/comments_spec.rb in inkwell-0.1.1 vs test/dummy/spec/functional/comments_spec.rb in inkwell-1.0.4

- old
+ new

@@ -154,12 +154,12 @@ @salkar_post.reload users_ids_who_comment_it = ActiveSupport::JSON.decode(@salkar_post.users_ids_who_comment_it) users_ids_who_comment_it.should == [{"user_id"=>@salkar.id, "comment_id"=>@comment.id}] ::Inkwell::TimelineItem.create :item_id => @comment.id, :user_id => @morozovm.id, :is_comment => true ::Inkwell::FavoriteItem.create :item_id => @comment.id, :user_id => @salkar.id, :is_comment => true - ::Inkwell::BlogItem.create :item_id => @comment.id, :user_id => @morozovm.id, :is_comment => true - ::Inkwell::BlogItem.create :item_id => @comment.id, :user_id => @salkar.id, :is_comment => true + ::Inkwell::BlogItem.create :item_id => @comment.id, :owner_id => @morozovm.id, :is_owner_user => true, :is_comment => true + ::Inkwell::BlogItem.create :item_id => @comment.id, :owner_id => @salkar.id, :is_owner_user => true, :is_comment => true ::Inkwell::FavoriteItem.all.size.should == 1 ::Inkwell::TimelineItem.all.size.should == 1 ::Inkwell::BlogItem.all.size.should == 3 ::Inkwell::Comment.all.size.should == 1 @@ -181,13 +181,13 @@ users_ids_who_comment_it.should == [{"user_id" => @salkar.id, "comment_id" => @comment.id}, {"user_id" => @morozovm.id, "comment_id" => @comment_to_delete.id}] ::Inkwell::TimelineItem.create :item_id => @comment_to_delete.id, :user_id => @morozovm.id, :is_comment => true ::Inkwell::FavoriteItem.create :item_id => @comment_to_delete.id, :user_id => @salkar.id, :is_comment => true ::Inkwell::TimelineItem.create :item_id => @comment.id, :user_id => @morozovm.id, :is_comment => true ::Inkwell::FavoriteItem.create :item_id => @comment.id, :user_id => @salkar.id, :is_comment => true - ::Inkwell::BlogItem.create :item_id => @comment_to_delete.id, :user_id => @morozovm.id, :is_comment => true - ::Inkwell::BlogItem.create :item_id => @comment_to_delete.id, :user_id => @salkar.id, :is_comment => true - ::Inkwell::BlogItem.create :item_id => @comment.id, :user_id => @salkar.id, :is_comment => true + ::Inkwell::BlogItem.create :item_id => @comment_to_delete.id, :owner_id => @morozovm.id, :is_owner_user => true, :is_comment => true + ::Inkwell::BlogItem.create :item_id => @comment_to_delete.id, :owner_id => @salkar.id, :is_owner_user => true, :is_comment => true + ::Inkwell::BlogItem.create :item_id => @comment.id, :owner_id => @salkar.id, :is_owner_user => true, :is_comment => true ::Inkwell::FavoriteItem.all.size.should == 2 ::Inkwell::TimelineItem.all.size.should == 2 ::Inkwell::BlogItem.all.size.should == 4 ::Inkwell::Comment.all.size.should == 2 @@ -212,13 +212,13 @@ users_ids_who_comment_it.should == [{"user_id" => @salkar.id, "comment_id" => @comment.id}, {"user_id" => @morozovm.id, "comment_id" => @comment2.id}] ::Inkwell::TimelineItem.create :item_id => @comment2.id, :user_id => @morozovm.id, :is_comment => true ::Inkwell::FavoriteItem.create :item_id => @comment2.id, :user_id => @salkar.id, :is_comment => true ::Inkwell::TimelineItem.create :item_id => @comment.id, :user_id => @morozovm.id, :is_comment => true ::Inkwell::FavoriteItem.create :item_id => @comment.id, :user_id => @salkar.id, :is_comment => true - ::Inkwell::BlogItem.create :item_id => @comment2.id, :user_id => @morozovm.id, :is_comment => true - ::Inkwell::BlogItem.create :item_id => @comment2.id, :user_id => @salkar.id, :is_comment => true - ::Inkwell::BlogItem.create :item_id => @comment.id, :user_id => @salkar.id, :is_comment => true + ::Inkwell::BlogItem.create :item_id => @comment2.id, :owner_id => @morozovm.id, :is_owner_user => true, :is_comment => true + ::Inkwell::BlogItem.create :item_id => @comment2.id, :owner_id => @salkar.id, :is_owner_user => true, :is_comment => true + ::Inkwell::BlogItem.create :item_id => @comment.id, :owner_id => @salkar.id, :is_owner_user => true, :is_comment => true ::Inkwell::FavoriteItem.all.size.should == 2 ::Inkwell::TimelineItem.all.size.should == 2 ::Inkwell::BlogItem.all.size.should == 4 ::Inkwell::Comment.all.size.should == 2 @comment.reload @@ -243,12 +243,12 @@ users_ids_who_comment_it.size.should == 4 ::Inkwell::TimelineItem.create :item_id => @comment2.id, :user_id => @morozovm.id, :is_comment => true ::Inkwell::FavoriteItem.create :item_id => @comment2.id, :user_id => @salkar.id, :is_comment => true ::Inkwell::TimelineItem.create :item_id => @comment.id, :user_id => @morozovm.id, :is_comment => true ::Inkwell::FavoriteItem.create :item_id => @comment.id, :user_id => @salkar.id, :is_comment => true - ::Inkwell::BlogItem.create :item_id => @comment2.id, :user_id => @morozovm.id, :is_comment => true - ::Inkwell::BlogItem.create :item_id => @comment2.id, :user_id => @salkar.id, :is_comment => true - ::Inkwell::BlogItem.create :item_id => @comment.id, :user_id => @salkar.id, :is_comment => true + ::Inkwell::BlogItem.create :item_id => @comment2.id, :owner_id => @morozovm.id, :is_owner_user => true, :is_comment => true + ::Inkwell::BlogItem.create :item_id => @comment2.id, :owner_id => @salkar.id, :is_owner_user => true, :is_comment => true + ::Inkwell::BlogItem.create :item_id => @comment.id, :owner_id => @salkar.id, :is_owner_user => true, :is_comment => true ::Inkwell::FavoriteItem.all.size.should == 2 ::Inkwell::TimelineItem.all.size.should == 2 ::Inkwell::BlogItem.all.size.should == 4 ::Inkwell::Comment.all.size.should == 4 @comment.reload \ No newline at end of file