From 4f0b638cda82810c83f89f23e83efefb60375514 Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Thu, 27 Jul 2017 22:16:07 +0900 Subject: [PATCH] Introduce access token fabricators (#4401) --- .../api/v1/accounts/credentials_controller_spec.rb | 2 +- .../api/v1/accounts/follower_accounts_controller_spec.rb | 2 +- .../api/v1/accounts/following_accounts_controller_spec.rb | 2 +- .../api/v1/accounts/relationships_controller_spec.rb | 2 +- spec/controllers/api/v1/accounts/search_controller_spec.rb | 2 +- spec/controllers/api/v1/accounts/statuses_controller_spec.rb | 2 +- spec/controllers/api/v1/accounts_controller_spec.rb | 2 +- spec/controllers/api/v1/blocks_controller_spec.rb | 2 +- spec/controllers/api/v1/domain_blocks_controller_spec.rb | 2 +- spec/controllers/api/v1/favourites_controller_spec.rb | 2 +- spec/controllers/api/v1/follow_requests_controller_spec.rb | 2 +- spec/controllers/api/v1/follows_controller_spec.rb | 2 +- spec/controllers/api/v1/instances_controller_spec.rb | 2 +- spec/controllers/api/v1/media_controller_spec.rb | 2 +- spec/controllers/api/v1/mutes_controller_spec.rb | 2 +- spec/controllers/api/v1/notifications_controller_spec.rb | 2 +- spec/controllers/api/v1/reports_controller_spec.rb | 2 +- spec/controllers/api/v1/search_controller_spec.rb | 2 +- .../api/v1/statuses/favourited_by_accounts_controller_spec.rb | 2 +- .../controllers/api/v1/statuses/favourites_controller_spec.rb | 2 +- spec/controllers/api/v1/statuses/mutes_controller_spec.rb | 2 +- .../api/v1/statuses/reblogged_by_accounts_controller_spec.rb | 2 +- spec/controllers/api/v1/statuses/reblogs_controller_spec.rb | 2 +- spec/controllers/api/v1/statuses_controller_spec.rb | 2 +- spec/controllers/api/v1/timelines/home_controller_spec.rb | 4 ++-- spec/controllers/api/v1/timelines/public_controller_spec.rb | 4 ++-- spec/controllers/api/v1/timelines/tag_controller_spec.rb | 4 ++-- spec/fabricators/access_token_fabricator.rb | 2 ++ spec/fabricators/accessible_access_token_fabricator.rb | 4 ++++ 29 files changed, 36 insertions(+), 30 deletions(-) create mode 100644 spec/fabricators/access_token_fabricator.rb create mode 100644 spec/fabricators/accessible_access_token_fabricator.rb diff --git a/spec/controllers/api/v1/accounts/credentials_controller_spec.rb b/spec/controllers/api/v1/accounts/credentials_controller_spec.rb index 89dbca11190..4a31003487e 100644 --- a/spec/controllers/api/v1/accounts/credentials_controller_spec.rb +++ b/spec/controllers/api/v1/accounts/credentials_controller_spec.rb @@ -4,7 +4,7 @@ describe Api::V1::Accounts::CredentialsController do render_views let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) } - let(:token) { double acceptable?: true, resource_owner_id: user.id } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'write') } before do allow(controller).to receive(:doorkeeper_token) { token } diff --git a/spec/controllers/api/v1/accounts/follower_accounts_controller_spec.rb b/spec/controllers/api/v1/accounts/follower_accounts_controller_spec.rb index 171852c755d..33982cb8f60 100644 --- a/spec/controllers/api/v1/accounts/follower_accounts_controller_spec.rb +++ b/spec/controllers/api/v1/accounts/follower_accounts_controller_spec.rb @@ -4,7 +4,7 @@ describe Api::V1::Accounts::FollowerAccountsController do render_views let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) } - let(:token) { double acceptable?: true, resource_owner_id: user.id } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'read') } before do Fabricate(:follow, target_account: user.account) diff --git a/spec/controllers/api/v1/accounts/following_accounts_controller_spec.rb b/spec/controllers/api/v1/accounts/following_accounts_controller_spec.rb index a4cad9163e7..e22f54a31dd 100644 --- a/spec/controllers/api/v1/accounts/following_accounts_controller_spec.rb +++ b/spec/controllers/api/v1/accounts/following_accounts_controller_spec.rb @@ -4,7 +4,7 @@ describe Api::V1::Accounts::FollowingAccountsController do render_views let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) } - let(:token) { double acceptable?: true, resource_owner_id: user.id } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'read') } before do Fabricate(:follow, account: user.account) diff --git a/spec/controllers/api/v1/accounts/relationships_controller_spec.rb b/spec/controllers/api/v1/accounts/relationships_controller_spec.rb index e281afcb922..3a9607317c4 100644 --- a/spec/controllers/api/v1/accounts/relationships_controller_spec.rb +++ b/spec/controllers/api/v1/accounts/relationships_controller_spec.rb @@ -4,7 +4,7 @@ describe Api::V1::Accounts::RelationshipsController do render_views let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) } - let(:token) { double acceptable?: true, resource_owner_id: user.id } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'read') } before do allow(controller).to receive(:doorkeeper_token) { token } diff --git a/spec/controllers/api/v1/accounts/search_controller_spec.rb b/spec/controllers/api/v1/accounts/search_controller_spec.rb index 40c82437ddd..42cc3f64deb 100644 --- a/spec/controllers/api/v1/accounts/search_controller_spec.rb +++ b/spec/controllers/api/v1/accounts/search_controller_spec.rb @@ -4,7 +4,7 @@ RSpec.describe Api::V1::Accounts::SearchController, type: :controller do render_views let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) } - let(:token) { double acceptable?: true, resource_owner_id: user.id } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'read') } before do allow(controller).to receive(:doorkeeper_token) { token } diff --git a/spec/controllers/api/v1/accounts/statuses_controller_spec.rb b/spec/controllers/api/v1/accounts/statuses_controller_spec.rb index 55cb5bcc24c..8b4fd6a5bc3 100644 --- a/spec/controllers/api/v1/accounts/statuses_controller_spec.rb +++ b/spec/controllers/api/v1/accounts/statuses_controller_spec.rb @@ -4,7 +4,7 @@ describe Api::V1::Accounts::StatusesController do render_views let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) } - let(:token) { double acceptable?: true, resource_owner_id: user.id } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'read') } before do allow(controller).to receive(:doorkeeper_token) { token } diff --git a/spec/controllers/api/v1/accounts_controller_spec.rb b/spec/controllers/api/v1/accounts_controller_spec.rb index 216a9cb3b60..c13509e7bbb 100644 --- a/spec/controllers/api/v1/accounts_controller_spec.rb +++ b/spec/controllers/api/v1/accounts_controller_spec.rb @@ -4,7 +4,7 @@ RSpec.describe Api::V1::AccountsController, type: :controller do render_views let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) } - let(:token) { double acceptable?: true, resource_owner_id: user.id } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'follow read') } before do allow(controller).to receive(:doorkeeper_token) { token } diff --git a/spec/controllers/api/v1/blocks_controller_spec.rb b/spec/controllers/api/v1/blocks_controller_spec.rb index 4fd968b27c8..f25a7e87881 100644 --- a/spec/controllers/api/v1/blocks_controller_spec.rb +++ b/spec/controllers/api/v1/blocks_controller_spec.rb @@ -4,7 +4,7 @@ RSpec.describe Api::V1::BlocksController, type: :controller do render_views let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) } - let(:token) { double acceptable?: true, resource_owner_id: user.id } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'follow') } before do Fabricate(:block, account: user.account) diff --git a/spec/controllers/api/v1/domain_blocks_controller_spec.rb b/spec/controllers/api/v1/domain_blocks_controller_spec.rb index ff5c5f3302d..3713931dc6d 100644 --- a/spec/controllers/api/v1/domain_blocks_controller_spec.rb +++ b/spec/controllers/api/v1/domain_blocks_controller_spec.rb @@ -4,7 +4,7 @@ RSpec.describe Api::V1::DomainBlocksController, type: :controller do render_views let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) } - let(:token) { double acceptable?: true, resource_owner_id: user.id } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'follow') } before do user.account.block_domain!('example.com') diff --git a/spec/controllers/api/v1/favourites_controller_spec.rb b/spec/controllers/api/v1/favourites_controller_spec.rb index 17e1ec31c95..85da87ad975 100644 --- a/spec/controllers/api/v1/favourites_controller_spec.rb +++ b/spec/controllers/api/v1/favourites_controller_spec.rb @@ -4,7 +4,7 @@ RSpec.describe Api::V1::FavouritesController, type: :controller do render_views let(:user) { Fabricate(:user) } - let(:token) { double acceptable?: true, resource_owner_id: user.id } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'read') } before do Fabricate(:favourite, account: user.account) diff --git a/spec/controllers/api/v1/follow_requests_controller_spec.rb b/spec/controllers/api/v1/follow_requests_controller_spec.rb index d455a0255d3..51df006a225 100644 --- a/spec/controllers/api/v1/follow_requests_controller_spec.rb +++ b/spec/controllers/api/v1/follow_requests_controller_spec.rb @@ -4,7 +4,7 @@ RSpec.describe Api::V1::FollowRequestsController, type: :controller do render_views let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice', locked: true)) } - let(:token) { double acceptable?: true, resource_owner_id: user.id } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'follow') } let(:follower) { Fabricate(:account, username: 'bob') } before do diff --git a/spec/controllers/api/v1/follows_controller_spec.rb b/spec/controllers/api/v1/follows_controller_spec.rb index cc4958ab598..b5e1d16dd7e 100644 --- a/spec/controllers/api/v1/follows_controller_spec.rb +++ b/spec/controllers/api/v1/follows_controller_spec.rb @@ -4,7 +4,7 @@ RSpec.describe Api::V1::FollowsController, type: :controller do render_views let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) } - let(:token) { double acceptable?: true, resource_owner_id: user.id } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'follow') } before do allow(controller).to receive(:doorkeeper_token) { token } diff --git a/spec/controllers/api/v1/instances_controller_spec.rb b/spec/controllers/api/v1/instances_controller_spec.rb index 544f3d28f81..eba233b0535 100644 --- a/spec/controllers/api/v1/instances_controller_spec.rb +++ b/spec/controllers/api/v1/instances_controller_spec.rb @@ -6,7 +6,7 @@ RSpec.describe Api::V1::InstancesController, type: :controller do render_views let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) } - let(:token) { double acceptable?: true, resource_owner_id: user.id } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id) } before do allow(controller).to receive(:doorkeeper_token) { token } diff --git a/spec/controllers/api/v1/media_controller_spec.rb b/spec/controllers/api/v1/media_controller_spec.rb index 00dcac95dcc..6bad3f05d8e 100644 --- a/spec/controllers/api/v1/media_controller_spec.rb +++ b/spec/controllers/api/v1/media_controller_spec.rb @@ -4,7 +4,7 @@ RSpec.describe Api::V1::MediaController, type: :controller do render_views let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) } - let(:token) { double acceptable?: true, resource_owner_id: user.id } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'write') } before do allow(controller).to receive(:doorkeeper_token) { token } diff --git a/spec/controllers/api/v1/mutes_controller_spec.rb b/spec/controllers/api/v1/mutes_controller_spec.rb index 85aad438414..3e6fa887b2a 100644 --- a/spec/controllers/api/v1/mutes_controller_spec.rb +++ b/spec/controllers/api/v1/mutes_controller_spec.rb @@ -4,7 +4,7 @@ RSpec.describe Api::V1::MutesController, type: :controller do render_views let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) } - let(:token) { double acceptable?: true, resource_owner_id: user.id } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'follow') } before do Fabricate(:mute, account: user.account) diff --git a/spec/controllers/api/v1/notifications_controller_spec.rb b/spec/controllers/api/v1/notifications_controller_spec.rb index e06230913a9..f493d0d38e8 100644 --- a/spec/controllers/api/v1/notifications_controller_spec.rb +++ b/spec/controllers/api/v1/notifications_controller_spec.rb @@ -4,7 +4,7 @@ RSpec.describe Api::V1::NotificationsController, type: :controller do render_views let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) } - let(:token) { double acceptable?: true, resource_owner_id: user.id } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'read') } let(:other) { Fabricate(:user, account: Fabricate(:account, username: 'bob')) } before do diff --git a/spec/controllers/api/v1/reports_controller_spec.rb b/spec/controllers/api/v1/reports_controller_spec.rb index 471ea4e0bcd..1eb5a43534c 100644 --- a/spec/controllers/api/v1/reports_controller_spec.rb +++ b/spec/controllers/api/v1/reports_controller_spec.rb @@ -6,7 +6,7 @@ RSpec.describe Api::V1::ReportsController, type: :controller do render_views let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) } - let(:token) { double acceptable?: true, resource_owner_id: user.id } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'read write') } before do allow(controller).to receive(:doorkeeper_token) { token } diff --git a/spec/controllers/api/v1/search_controller_spec.rb b/spec/controllers/api/v1/search_controller_spec.rb index 4d22ddc98fc..ff0c254b1fb 100644 --- a/spec/controllers/api/v1/search_controller_spec.rb +++ b/spec/controllers/api/v1/search_controller_spec.rb @@ -6,7 +6,7 @@ RSpec.describe Api::V1::SearchController, type: :controller do render_views let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) } - let(:token) { double acceptable?: true, resource_owner_id: user.id } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'read') } before do allow(controller).to receive(:doorkeeper_token) { token } diff --git a/spec/controllers/api/v1/statuses/favourited_by_accounts_controller_spec.rb b/spec/controllers/api/v1/statuses/favourited_by_accounts_controller_spec.rb index 1acb990a008..556731d5783 100644 --- a/spec/controllers/api/v1/statuses/favourited_by_accounts_controller_spec.rb +++ b/spec/controllers/api/v1/statuses/favourited_by_accounts_controller_spec.rb @@ -5,7 +5,7 @@ RSpec.describe Api::V1::Statuses::FavouritedByAccountsController, type: :control let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) } let(:app) { Fabricate(:application, name: 'Test app', website: 'http://testapp.com') } - let(:token) { double acceptable?: true, resource_owner_id: user.id, application: app } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, application: app) } context 'with an oauth token' do before do diff --git a/spec/controllers/api/v1/statuses/favourites_controller_spec.rb b/spec/controllers/api/v1/statuses/favourites_controller_spec.rb index eb77072d259..2a029230d7f 100644 --- a/spec/controllers/api/v1/statuses/favourites_controller_spec.rb +++ b/spec/controllers/api/v1/statuses/favourites_controller_spec.rb @@ -7,7 +7,7 @@ describe Api::V1::Statuses::FavouritesController do let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) } let(:app) { Fabricate(:application, name: 'Test app', website: 'http://testapp.com') } - let(:token) { double acceptable?: true, resource_owner_id: user.id, application: app } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'write', application: app) } context 'with an oauth token' do before do diff --git a/spec/controllers/api/v1/statuses/mutes_controller_spec.rb b/spec/controllers/api/v1/statuses/mutes_controller_spec.rb index 1f8c29e3d8b..54c594e92ce 100644 --- a/spec/controllers/api/v1/statuses/mutes_controller_spec.rb +++ b/spec/controllers/api/v1/statuses/mutes_controller_spec.rb @@ -7,7 +7,7 @@ describe Api::V1::Statuses::MutesController do let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) } let(:app) { Fabricate(:application, name: 'Test app', website: 'http://testapp.com') } - let(:token) { double acceptable?: true, resource_owner_id: user.id, application: app } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'write', application: app) } context 'with an oauth token' do before do diff --git a/spec/controllers/api/v1/statuses/reblogged_by_accounts_controller_spec.rb b/spec/controllers/api/v1/statuses/reblogged_by_accounts_controller_spec.rb index c5624023f18..ba022a96e00 100644 --- a/spec/controllers/api/v1/statuses/reblogged_by_accounts_controller_spec.rb +++ b/spec/controllers/api/v1/statuses/reblogged_by_accounts_controller_spec.rb @@ -5,7 +5,7 @@ RSpec.describe Api::V1::Statuses::RebloggedByAccountsController, type: :controll let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) } let(:app) { Fabricate(:application, name: 'Test app', website: 'http://testapp.com') } - let(:token) { double acceptable?: true, resource_owner_id: user.id, application: app } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, application: app) } context 'with an oauth token' do before do diff --git a/spec/controllers/api/v1/statuses/reblogs_controller_spec.rb b/spec/controllers/api/v1/statuses/reblogs_controller_spec.rb index 36c323736bb..d6d36c1b2f6 100644 --- a/spec/controllers/api/v1/statuses/reblogs_controller_spec.rb +++ b/spec/controllers/api/v1/statuses/reblogs_controller_spec.rb @@ -7,7 +7,7 @@ describe Api::V1::Statuses::ReblogsController do let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) } let(:app) { Fabricate(:application, name: 'Test app', website: 'http://testapp.com') } - let(:token) { double acceptable?: true, resource_owner_id: user.id, application: app } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'write', application: app) } context 'with an oauth token' do before do diff --git a/spec/controllers/api/v1/statuses_controller_spec.rb b/spec/controllers/api/v1/statuses_controller_spec.rb index 3d65180ab3a..a36265395ba 100644 --- a/spec/controllers/api/v1/statuses_controller_spec.rb +++ b/spec/controllers/api/v1/statuses_controller_spec.rb @@ -5,7 +5,7 @@ RSpec.describe Api::V1::StatusesController, type: :controller do let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) } let(:app) { Fabricate(:application, name: 'Test app', website: 'http://testapp.com') } - let(:token) { double acceptable?: true, resource_owner_id: user.id, application: app } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, application: app, scopes: 'write') } context 'with an oauth token' do before do diff --git a/spec/controllers/api/v1/timelines/home_controller_spec.rb b/spec/controllers/api/v1/timelines/home_controller_spec.rb index faa6c60ce27..4d45235209d 100644 --- a/spec/controllers/api/v1/timelines/home_controller_spec.rb +++ b/spec/controllers/api/v1/timelines/home_controller_spec.rb @@ -12,7 +12,7 @@ describe Api::V1::Timelines::HomeController do end context 'with a user context' do - let(:token) { double acceptable?: true, resource_owner_id: user.id } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'read') } describe 'GET #show' do before do @@ -30,7 +30,7 @@ describe Api::V1::Timelines::HomeController do end context 'without a user context' do - let(:token) { double acceptable?: true, resource_owner_id: nil } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: nil, scopes: 'read') } describe 'GET #show' do it 'returns http unprocessable entity' do diff --git a/spec/controllers/api/v1/timelines/public_controller_spec.rb b/spec/controllers/api/v1/timelines/public_controller_spec.rb index 353ab9bc2d8..3acf2e2678e 100644 --- a/spec/controllers/api/v1/timelines/public_controller_spec.rb +++ b/spec/controllers/api/v1/timelines/public_controller_spec.rb @@ -12,7 +12,7 @@ describe Api::V1::Timelines::PublicController do end context 'with a user context' do - let(:token) { double acceptable?: true, resource_owner_id: user.id } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id) } describe 'GET #show' do before do @@ -42,7 +42,7 @@ describe Api::V1::Timelines::PublicController do end context 'without a user context' do - let(:token) { double acceptable?: true, resource_owner_id: nil } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: nil) } describe 'GET #show' do it 'returns http success' do diff --git a/spec/controllers/api/v1/timelines/tag_controller_spec.rb b/spec/controllers/api/v1/timelines/tag_controller_spec.rb index f743f0cde1a..74de1e81f26 100644 --- a/spec/controllers/api/v1/timelines/tag_controller_spec.rb +++ b/spec/controllers/api/v1/timelines/tag_controller_spec.rb @@ -12,7 +12,7 @@ describe Api::V1::Timelines::TagController do end context 'with a user context' do - let(:token) { double acceptable?: true, resource_owner_id: user.id } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id) } describe 'GET #show' do before do @@ -28,7 +28,7 @@ describe Api::V1::Timelines::TagController do end context 'without a user context' do - let(:token) { double acceptable?: true, resource_owner_id: nil } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: nil) } describe 'GET #show' do it 'returns http success' do diff --git a/spec/fabricators/access_token_fabricator.rb b/spec/fabricators/access_token_fabricator.rb new file mode 100644 index 00000000000..1856a8eb3b3 --- /dev/null +++ b/spec/fabricators/access_token_fabricator.rb @@ -0,0 +1,2 @@ +Fabricator :access_token, from: 'Doorkeeper::AccessToken' do +end diff --git a/spec/fabricators/accessible_access_token_fabricator.rb b/spec/fabricators/accessible_access_token_fabricator.rb new file mode 100644 index 00000000000..4b7e99b2070 --- /dev/null +++ b/spec/fabricators/accessible_access_token_fabricator.rb @@ -0,0 +1,4 @@ +Fabricator :accessible_access_token, from: :access_token do + expires_in { nil } + revoked_at { nil } +end