about summary refs log tree commit diff
path: root/spec/controllers/api/v1/timelines
diff options
context:
space:
mode:
authorkibigo! <marrus-sh@users.noreply.github.com>2017-08-01 13:07:43 -0700
committerkibigo! <marrus-sh@users.noreply.github.com>2017-08-01 13:20:29 -0700
commit8150689b48716bb016d492d28cef08600a4b315e (patch)
treea05a2539e894c79ef17698dce0da5a6af0c25bf6 /spec/controllers/api/v1/timelines
parentb61e3daf983d87c6d2de7e54d420c2e8f5a531e6 (diff)
parent7ef848256871454a790a9b7cc725053c67ba3da4 (diff)
Merge upstream (#111)
Diffstat (limited to 'spec/controllers/api/v1/timelines')
-rw-r--r--spec/controllers/api/v1/timelines/home_controller_spec.rb4
-rw-r--r--spec/controllers/api/v1/timelines/public_controller_spec.rb4
-rw-r--r--spec/controllers/api/v1/timelines/tag_controller_spec.rb4
3 files changed, 6 insertions, 6 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
diff --git a/spec/controllers/api/v1/timelines/public_controller_spec.rb b/spec/controllers/api/v1/timelines/public_controller_spec.rb
index 353ab9bc2..3acf2e267 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 f743f0cde..74de1e81f 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