Sha256: e6ce47d6db4cf60ef27a3a2d0fe6d7c26ef7be860c7426bb20d3ad14f132e485
Contents?: true
Size: 627 Bytes
Versions: 19
Compression:
Stored size: 627 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe LikesController do render_views it "should create like" do @activity = Factory(:activity) @subject = @activity.receiver_subject sign_in @subject post :create, :activity_id => @activity.id assert @activity.liked_by?(@subject) end it "should destroy like" do @like_activity = Factory(:like_activity) @activity = @like_activity.parent @subject = @like_activity.sender_subject sign_in @subject delete :destroy, :activity_id => @activity.id assert ! @activity.liked_by?(@subject) end end
Version data entries
19 entries across 19 versions & 2 rubygems