Sha256: 9ae606fd52dc7e8a7db05570f8f79b0737abc1a02cc8f261675f2da1e1a89ad5

Contents?: true

Size: 584 Bytes

Versions: 6

Compression:

Stored size: 584 Bytes

Contents

require 'spec_helper'

describe Notifiable::DeviceToken do
  
  describe "#locale" do
    subject(:token) { create(:mock_token, :locale => 'en') }
    
    it { expect(token.locale).to eq 'en' }
  end
  
  describe "#name" do
    subject(:token) { create(:mock_token, :name => "Matt's iPhone") }
    
    it { expect(token.name).to eq "Matt's iPhone" }
  end
  
  describe "#notification_statuses" do
    subject(:token) { create(:mock_token, :notification_statuses => create_list(:notification_status, 2)) }
    
    it { expect(token.notification_statuses.count).to eq 2 }
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
notifiable-rails-0.24.3 spec/model/device_token_spec.rb
notifiable-rails-0.24.2 spec/model/device_token_spec.rb
notifiable-rails-0.24.1 spec/model/device_token_spec.rb
notifiable-rails-0.24.0 spec/model/device_token_spec.rb
notifiable-rails-0.23.0 spec/model/device_token_spec.rb
notifiable-rails-0.22.1 spec/model/device_token_spec.rb