about summary refs log tree commit diff
path: root/spec/controllers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-12-06 18:22:59 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-12-06 18:22:59 +0100
commitf978b06dd188fef4c2ece5e787818579b663ddf8 (patch)
tree70a0969b208ac3b0393c5fb9e54b8bd222782e6f /spec/controllers
parentf406e01fcf7d69045cf3ad8ea8dea51acd85535b (diff)
Add suspend account functionality to admin UI
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/api/v1/notifications_controller_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/controllers/api/v1/notifications_controller_spec.rb b/spec/controllers/api/v1/notifications_controller_spec.rb
new file mode 100644
index 000000000..e5f7eec73
--- /dev/null
+++ b/spec/controllers/api/v1/notifications_controller_spec.rb
@@ -0,0 +1,19 @@
+require 'rails_helper'
+
+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 }
+
+  before do
+    allow(controller).to receive(:doorkeeper_token) { token }
+  end
+
+  describe 'GET #index' do
+    it 'returns http success' do
+      get :index
+      expect(response).to have_http_status(:success)
+    end
+  end
+end