Sha256: cd5c7f161cef51d647fe062807fbe972b9653dae8f05e38b3d6c0d8da8fc5a2a

Contents?: true

Size: 719 Bytes

Versions: 6

Compression:

Stored size: 719 Bytes

Contents

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

describe MailboxerMail do
  
  before do
    @entity1 = Factory(:user)
    @entity2 = Factory(:user)
    @mail1 = @entity1.send_message(@entity2,"Body","Subject")   
  end
  
  it "should belong to a message" do
    assert @mail1.message
  end
  
  it "should belong to a conversation" do
    assert @mail1.conversation    
  end
  
  it "should be able to be marked as unread" do
    @mail1.read.should==true
    @mail1.mark_as_unread
    @mail1.read.should==false
  end
  
  it "should be able to be marked as read" do
    @mail1.read.should==true
    @mail1.mark_as_unread
    @mail1.mark_as_read
    @mail1.read.should==true    
  end
  
  
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mailboxer-0.0.8 spec/models/mailboxer_mail_spec.rb
mailboxer-0.0.7 spec/models/mailboxer_mail_spec.rb
mailboxer-0.0.6 spec/models/mailboxer_mail_spec.rb
mailboxer-0.0.5 spec/models/mailboxer_mail_spec.rb
mailboxer-0.0.4 spec/models/mailboxer_mail_spec.rb
mailboxer-0.0.3 spec/models/mailboxer_mail_spec.rb