about summary refs log tree commit diff
path: root/spec/controllers/api
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-02-05 17:51:44 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-02-05 17:51:44 +0100
commit77e13c2bc93fdb633f27f94989ab5770f9ecc3b3 (patch)
treec9b139593bf3bd478bfaa2e44657492cfab33f94 /spec/controllers/api
parent19b9e1e2c3d621b5f9f2367980dae62648fe22fa (diff)
Removing failed push notification API, make context loads use cache
Diffstat (limited to 'spec/controllers/api')
-rw-r--r--spec/controllers/api/v1/devices_controller_spec.rb38
1 files changed, 0 insertions, 38 deletions
diff --git a/spec/controllers/api/v1/devices_controller_spec.rb b/spec/controllers/api/v1/devices_controller_spec.rb
deleted file mode 100644
index 745a462e3..000000000
--- a/spec/controllers/api/v1/devices_controller_spec.rb
+++ /dev/null
@@ -1,38 +0,0 @@
-require 'rails_helper'
-
-RSpec.describe Api::V1::DevicesController, type: :controller do
-  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 'POST #register' do
-    before do
-      post :register, params: { registration_id: 'foo123' }
-    end
-
-    it 'returns http success' do
-      expect(response).to have_http_status(:success)
-    end
-
-    it 'registers device' do
-      expect(Device.where(account: user.account, registration_id: 'foo123').first).to_not be_nil
-    end
-  end
-
-  describe 'POST #unregister' do
-    before do
-      post :unregister, params: { registration_id: 'foo123' }
-    end
-
-    it 'returns http success' do
-      expect(response).to have_http_status(:success)
-    end
-
-    it 'removes device' do
-      expect(Device.where(account: user.account, registration_id: 'foo123').first).to be_nil
-    end
-  end
-end