test/dummy/spec/functional/timeline_spec.rb in inkwell-0.0.3 vs test/dummy/spec/functional/timeline_spec.rb in inkwell-0.1.1

- old
+ new

@@ -30,11 +30,11 @@ @talisman.follow @salkar @talisman.reload @talisman.follow @morozovm @talisman.reload - tline = @talisman.timeline(nil, 10, @salkar) + tline = @talisman.timeline(:for_user => @salkar) tline.size.should == 10 tline[0].should == @morozovm_post2 tline[1].should == @morozovm_post1 tline[1].from_sources_in_timeline.should == ActiveSupport::JSON.encode([{'user_id' => @salkar.id, 'type' => 'reblog'}, {'user_id' => @morozovm.id, 'type' => 'following'}]) tline[1].is_reblogged.should == true @@ -56,10 +56,10 @@ @salkar_comment = @salkar.comments.create :post_id => @salkar_post.id, :body => "salkar_comment_body" @talisman.follow @morozovm @morozovm.reblog @salkar_comment @morozovm.favorite @salkar_comment @talisman.reload - tline = @talisman.timeline(nil, 10, @morozovm) + tline = @talisman.timeline(:last_shown_obj_id => nil, :limit => 10,:for_user => @morozovm) tline.size.should == 1 tline[0].should == @salkar_comment tline[0].is_reblogged.should == true tline[0].is_favorited.should == true tline[0].from_sources_in_timeline.should == ActiveSupport::JSON.encode([{'user_id' => @morozovm.id, 'type' => 'reblog'}]) \ No newline at end of file