test/dummy/spec/functional/reblog_spec.rb in inkwell-0.1.1 vs test/dummy/spec/functional/reblog_spec.rb in inkwell-1.0.4
- old
+ new
@@ -11,18 +11,18 @@
end
it "user should reblog post" do
@morozovm.reblog @salkar_post
::Inkwell::BlogItem.where(:item_id => @salkar_post.id, :is_comment => false).size.should == 2
- ::Inkwell::BlogItem.where(:item_id => @salkar_post.id, :is_comment => false, :user_id => @morozovm.id, :is_reblog => true).size.should == 1
+ ::Inkwell::BlogItem.where(:item_id => @salkar_post.id, :is_comment => false, :owner_id => @morozovm.id, :is_owner_user => true, :is_reblog => true).size.should == 1
@salkar_post.reload
@salkar_post.users_ids_who_reblog_it.should == "[#{@morozovm.id}]"
end
it "user should reblog comment" do
@morozovm.reblog @salkar_comment
- ::Inkwell::BlogItem.where(:item_id => @salkar_comment.id, :is_comment => true, :user_id => @morozovm.id, :is_reblog => true).size.should == 1
+ ::Inkwell::BlogItem.where(:item_id => @salkar_comment.id, :is_comment => true, :owner_id => @morozovm.id, :is_owner_user => true, :is_reblog => true).size.should == 1
@salkar_comment.reload
@salkar_comment.users_ids_who_reblog_it.should == "[#{@morozovm.id}]"
end
it "timeline item should been created for followers when user reblog post" do
@@ -90,18 +90,18 @@
it "user should unreblog post" do
@morozovm.reblog @salkar_post
@morozovm.unreblog @salkar_post
::Inkwell::BlogItem.where(:item_id => @salkar_post.id, :is_comment => false).size.should == 1
- ::Inkwell::BlogItem.where(:item_id => @salkar_post.id, :is_comment => false, :user_id => @morozovm.id, :is_reblog => true).size.should == 0
+ ::Inkwell::BlogItem.where(:item_id => @salkar_post.id, :is_comment => false, :owner_id => @morozovm.id, :is_owner_user => true, :is_reblog => true).size.should == 0
@salkar_post.reload
@salkar_post.users_ids_who_reblog_it.should == "[]"
end
it "user should unreblog comment" do
@morozovm.reblog @salkar_comment
@morozovm.unreblog @salkar_comment
- ::Inkwell::BlogItem.where(:item_id => @salkar_comment.id, :is_comment => true, :user_id => @morozovm.id, :is_reblog => true).size.should == 0
+ ::Inkwell::BlogItem.where(:item_id => @salkar_comment.id, :is_comment => true, :owner_id => @morozovm.id, :is_owner_user => true, :is_reblog => true).size.should == 0
@salkar_comment.reload
@salkar_comment.users_ids_who_reblog_it.should == "[]"
end
it "timeline items should delete for followers when user unreblog post" do
\ No newline at end of file