Sha256: d5140b8a2e48d43803bda0c8c4f1b0b788ad3e601383ad8e0ee34d912d85bf7f

Contents?: true

Size: 948 Bytes

Versions: 7

Compression:

Stored size: 948 Bytes

Contents

require 'factory_girl_rails'

FactoryGirl.define do
  factory :user do
    sequence(:name)     { |n| "User #{n}" }
    sequence(:email)    { |n| "email#{n}@curupira.com" }
    sequence(:username) { |n| "user_#{n}" }
    password 12345678
    active true
  end

  factory :group do
    sequence(:name) { |n| "Group #{n}" }
    active true
  end

  factory :group_user do
    group
    user
  end

  factory :feature do
    name  "Leitura"
    active true
  end 

  factory :service do
    name "users"
  end

  factory :action_label do
    name "new"
  end

  factory :feature_service do
    feature
    service
  end

  factory :feature_action_label do
    feature
    action_label
  end
  
  factory :role do
    sequence(:name)     { |n| "Role #{n}" }
    active true
  end

  factory :authorization do
    role
    feature
  end

  factory :role_group do
    group
    role
  end

  factory :role_group_user do
    group_user
    role
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
curupira-0.1.7 spec/support/factories.rb
curupira-0.1.6 spec/support/factories.rb
curupira-0.1.4 spec/support/factories.rb
curupira-0.1.3 spec/support/factories.rb
curupira-0.1.2 spec/support/factories.rb
curupira-0.1.1 spec/support/factories.rb
curupira-0.1.0 spec/support/factories.rb