Sha256: 89616df8bfc9b5edf9b4b8612bdf53402f511207bf0b283c225c12026aa95370

Contents?: true

Size: 992 Bytes

Versions: 7

Compression:

Stored size: 992 Bytes

Contents

require 'spec_helper'

describe Mailboxer::Message do
  
  before do
    @entity1 = FactoryGirl.create(:user)
    @entity2 = FactoryGirl.create(:user)
    @receipt1 = @entity1.send_message(@entity2,"Body","Subject")
    @receipt2 = @entity2.reply_to_all(@receipt1,"Reply body 1")
    @receipt3 = @entity1.reply_to_all(@receipt2,"Reply body 2")
    @receipt4 = @entity2.reply_to_all(@receipt3,"Reply body 3")
    @message1 = @receipt1.notification
    @message4 = @receipt4.notification
    @conversation = @message1.conversation
  end  
  
  it "should have right recipients" do
  	@receipt1.notification.recipients.count.should==2
  	@receipt2.notification.recipients.count.should==2
  	@receipt3.notification.recipients.count.should==2
  	@receipt4.notification.recipients.count.should==2      
  end

  it "should be able to be marked as deleted" do
    @receipt1.deleted.should==false
    @message1.mark_as_deleted @entity1
    @message1.is_deleted?(@entity1).should==true
  end
    
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
mailboxer-0.12.4 spec/models/message_spec.rb
mailboxer-0.12.3 spec/models/message_spec.rb
mailboxer-0.12.2 spec/models/message_spec.rb
mailboxer-0.12.1 spec/models/message_spec.rb
mailboxer-0.12.0 spec/models/message_spec.rb
mailboxer-0.12.0.rc2 spec/models/message_spec.rb
mailboxer-0.12.0.rc1 spec/models/message_spec.rb