Sha256: d3c8566ca2c9a334f1bf29fad2cd22218d599415e70fe7ebd27a32a229f629de
Contents?: true
Size: 1.3 KB
Versions: 19
Compression:
Stored size: 1.3 KB
Contents
require 'spec_helper' describe ActivityAction do context "a following contact" do before do @tie = Factory(:friend) end it "should create follow action" do action = @tie.sender.action_to(@tie.receiver) action.should be_present action.should be_follow end it "should remove follow action" do action = @tie.sender.action_to(@tie.receiver) action.should be_present @tie.destroy action.reload.should_not be_follow end describe "where posting to other owner" do before do @post = Factory(:post) end it "should not be duplicated" do @post.received_actions.count.should == 2 end end describe "where posting to self" do before do @post = Factory(:self_post) end it "should not be duplicated" do @post.received_actions.count.should == 1 end end describe "where building the post" do before do user = Factory(:user) @post = Post.new :text => "Testing", :author => user, :owner => user, :user_author => user @post.save! end it "should not be duplicated" do @post.received_actions.count.should == 1 end end end end
Version data entries
19 entries across 19 versions & 2 rubygems