about summary refs log tree commit diff
path: root/spec/controllers/api/v1/timelines
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2018-12-18 19:37:07 +0100
committerGitHub <noreply@github.com>2018-12-18 19:37:07 +0100
commit74ee5bdf37799fba5990a6b492e3d52c32efe8d7 (patch)
treeafdeb6b23ff4d7bd5e53c4e13cb2c3dfafb4b986 /spec/controllers/api/v1/timelines
parent36d27e289177fdec5332539c94b8192022a412f2 (diff)
parent0ef2c1415a13d305d4c73c71f27a1366eee702a0 (diff)
Merge pull request #862 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'spec/controllers/api/v1/timelines')
-rw-r--r--spec/controllers/api/v1/timelines/direct_controller_spec.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/controllers/api/v1/timelines/direct_controller_spec.rb b/spec/controllers/api/v1/timelines/direct_controller_spec.rb
new file mode 100644
index 000000000..a22c2cbea
--- /dev/null
+++ b/spec/controllers/api/v1/timelines/direct_controller_spec.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+require 'rails_helper'
+
+RSpec.describe Api::V1::Timelines::DirectController, type: :controller do
+  let(:user)  { Fabricate(:user) }
+  let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'read:statuses') }
+
+  describe 'GET #show' do
+    it 'returns 200' do
+      allow(controller).to receive(:doorkeeper_token) { token }
+      get :show
+
+      expect(response).to have_http_status(200)
+    end
+  end
+end