cartodb-4.42/spec/factories/groups.rb

25 lines
542 B
Ruby
Raw Normal View History

2024-04-06 13:25:13 +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