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

Version Path
social_stream-base-0.7.1 spec/controllers/likes_controller_spec.rb
social_stream-base-0.7.0 spec/controllers/likes_controller_spec.rb
social_stream-base-0.6.8 spec/controllers/likes_controller_spec.rb
social_stream-base-0.6.6 spec/controllers/likes_controller_spec.rb
social_stream-base-0.6.5 spec/controllers/likes_controller_spec.rb
social_stream-base-0.6.3 spec/controllers/likes_controller_spec.rb
social_stream-base-0.6.2 spec/controllers/likes_controller_spec.rb
social_stream-base-0.6.1 spec/controllers/likes_controller_spec.rb
social_stream-base-0.6.0 spec/controllers/likes_controller_spec.rb
social_stream-base-0.5.2 spec/controllers/likes_controller_spec.rb
social_stream-base-0.5.1 spec/controllers/likes_controller_spec.rb
social_stream-base-0.5.0 spec/controllers/likes_controller_spec.rb
social_stream-0.4.6 spec/controllers/likes_controller_spec.rb
social_stream-0.4.5 spec/controllers/likes_controller_spec.rb
social_stream-0.4.4 spec/controllers/likes_controller_spec.rb
social_stream-0.4.3 spec/controllers/likes_controller_spec.rb
social_stream-0.4.2 spec/controllers/likes_controller_spec.rb
social_stream-0.4.1 spec/controllers/likes_controller_spec.rb
social_stream-0.4.0 spec/controllers/likes_controller_spec.rb