Sha256: 83a9a2d11d56279b3f0bda385bda857f866b685b30c95b5ebe2c239c7494175b

Contents?: true

Size: 672 Bytes

Versions: 1

Compression:

Stored size: 672 Bytes

Contents

FactoryGirl.define do

  factory :mock_token, :class => Notifiable::DeviceToken do
    provider :mock
    sequence(:token) {|n| "ABCD#{n}" }
    app
  end
  
  factory :app, :class => Notifiable::App do
  end
  
  factory :notification, :class => Notifiable::Notification do
    app
  end
  
  
  factory :notification_status, :class => Notifiable::NotificationStatus do
    notification
    status 0
  end
  
  sequence(:email) {|n| "person-#{n}@example.com" }
  
  factory :user do
    email
    
    factory :user_with_mock_token do
      after(:create) do |user, evaluator|
        FactoryGirl.create(:mock_token, :user_id => user.id)
      end
    end
  end
  
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
notifiable-rails-0.18.0 spec/support/factories.rb