Sha256: 28841c8da46d63a887b4990c8713f0f1e72810d21344f696d0e4431df06187ef

Contents?: true

Size: 705 Bytes

Versions: 1

Compression:

Stored size: 705 Bytes

Contents

require 'spec_helper'

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mailboxer-0.8.0 spec/models/receipt_spec.rb