Sha256: a31bd6e1e3a6cefb7954fcb66cad100457cf0c6e1f38534f782e5c63f3598948

Contents?: true

Size: 589 Bytes

Versions: 12

Compression:

Stored size: 589 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe Contact do
  context "inverse" do
    before do
      @sent = Factory(:contact)
      @received = @sent.inverse!
    end

    it "should be set" do
      @sent.reload.inverse.should eq(@received)
    end
  end

  context "with message" do
    before do
      @sent = Factory(:contact, :message => 'Hello')
      @received = @sent.inverse!
    end

    it "should send to the receiver" do
      @sent.message.should == 'Hello'
      @sent.sender_subject.should eq(@received.receiver_subject)
    end
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
social_stream-base-0.7.6 spec/models/contact_spec.rb
social_stream-base-0.7.5 spec/models/contact_spec.rb
social_stream-base-0.7.4 spec/models/contact_spec.rb
social_stream-base-0.7.3 spec/models/contact_spec.rb
social_stream-base-0.7.2 spec/models/contact_spec.rb
social_stream-base-0.7.1 spec/models/contact_spec.rb
social_stream-base-0.7.0 spec/models/contact_spec.rb
social_stream-base-0.6.8 spec/models/contact_spec.rb
social_stream-base-0.6.6 spec/models/contact_spec.rb
social_stream-base-0.6.5 spec/models/contact_spec.rb
social_stream-base-0.6.3 spec/models/contact_spec.rb
social_stream-base-0.6.2 spec/models/contact_spec.rb