cartodb/spec/support/factories/client_applications.rb

14 lines
365 B
Ruby
Raw Normal View History

2020-06-15 10:58:47 +08:00
module CartoDB
module Factories
def new_client_application(attributes = {})
attributes = attributes.dup
attributes[:user] ||= create_user
ClientApplication.new(attributes)
end
def create_client_application(attributes = {})
client_application = new_client_application(attributes)
client_application.save
end
end
end