Also fix "mocha/mini_test" -> "mocha/minitest" warning.
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz@veritasgenetics.com>
gem 'protected_attributes'
group :test, :development do
- gem 'factory_girl_rails'
+ gem 'factory_bot_rails'
gem 'database_cleaner'
gem 'ruby-prof'
# Note: "require: false" here tells bunder not to automatically
eventmachine (1.2.6)
execjs (2.7.0)
extlib (0.9.16)
- factory_girl (4.9.0)
+ factory_bot (4.11.1)
activesupport (>= 3.0.0)
- factory_girl_rails (4.9.0)
- factory_girl (~> 4.9.0)
+ factory_bot_rails (4.11.1)
+ factory_bot (~> 4.11.1)
railties (>= 3.0.0)
faraday (0.12.2)
multipart-post (>= 1.2, < 3)
arvados-cli
coffee-rails (~> 4.0)
database_cleaner
- factory_girl_rails
+ factory_bot_rails
faye-websocket
httpclient
jquery-rails
#
# SPDX-License-Identifier: AGPL-3.0
-FactoryGirl.define do
+FactoryBot.define do
factory :api_client do
- is_trusted false
+ is_trusted { false }
to_create do |instance|
CurrentApiClientHelper.act_as_system_user do
instance.save!
#
# SPDX-License-Identifier: AGPL-3.0
-FactoryGirl.define do
+FactoryBot.define do
factory :api_client_authorization do
api_client
- scopes ['all']
+ scopes { ['all'] }
trait :trusted do
association :api_client, factory: :api_client, is_trusted: true
#
# SPDX-License-Identifier: AGPL-3.0
-FactoryGirl.define do
+FactoryBot.define do
factory :group do
end
end
#
# SPDX-License-Identifier: AGPL-3.0
-FactoryGirl.define do
+FactoryBot.define do
factory :link do
factory :permission_link do
- link_class 'permission'
+ link_class { 'permission' }
end
end
end
extend CurrentApiClient
end
-FactoryGirl.define do
+FactoryBot.define do
factory :user do
transient do
- join_groups []
+ join_groups { [] }
end
after :create do |user, evaluator|
CurrentApiClientHelper.act_as_system_user do
end
end
end
- first_name "Factory"
- last_name "Factory"
+ first_name { "Factory" }
+ last_name { "Factory" }
identity_url do
"https://example.com/#{rand(2**24).to_s(36)}"
end
factory :active_user do
- is_active true
+ is_active { true }
after :create do |user|
CurrentApiClientHelper.act_as_system_user do
Link.create!(tail_uuid: user.uuid,
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require 'mocha'
-require 'mocha/mini_test'
+require 'mocha/minitest'
module ArvadosTestSupport
def json_response
end
class ActiveSupport::TestCase
- include FactoryGirl::Syntax::Methods
+ include FactoryBot::Syntax::Methods
fixtures :all
include ArvadosTestSupport