cartodb/spec/factories/groups.rb

26 lines
560 B
Ruby
Raw Normal View History

2021-01-24 16:18:54 +08:00
# encoding: utf-8
2020-06-15 10:58:47 +08:00
require 'helpers/unique_names_helper'
include UniqueNamesHelper
FactoryGirl.define do
factory :carto_group, class: Carto::Group do
initialize_with { Carto::Group.send :new }
name 'A_Group'
display_name 'A Group'
database_role 'database_role'
end
factory :new_random_group, class: Carto::Group do |_g|
initialize_with { Carto::Group.send :new }
name { unique_name('group') }
display_name { "Group #{name}" }
factory :random_group do
database_role { "database_role_#{name}" }
end
end
end