diff options
author | Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp> | 2017-07-27 22:16:07 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-07-27 15:16:07 +0200 |
commit | 4f0b638cda82810c83f89f23e83efefb60375514 (patch) | |
tree | 5da8fe32130a4fb6f87499987cc5aa2c8cdf09fc /spec/controllers/api/v1/timelines/home_controller_spec.rb | |
parent | bb96ba13cf78c0bee1919c32e61bf0644c89a209 (diff) |
Introduce access token fabricators (#4401)
Diffstat (limited to 'spec/controllers/api/v1/timelines/home_controller_spec.rb')
-rw-r--r-- | spec/controllers/api/v1/timelines/home_controller_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/controllers/api/v1/timelines/home_controller_spec.rb b/spec/controllers/api/v1/timelines/home_controller_spec.rb index faa6c60ce..4d4523520 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 |