diff options
author | Matt Jankowski <mjankowski@thoughtbot.com> | 2017-06-07 14:09:25 -0400 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-06-07 20:09:25 +0200 |
commit | 73540ffe6b03cf27dd7738ebd157573488f376cf (patch) | |
tree | a8b37da451a087ae4c265de5cd7135b4a45c7119 /spec/controllers/api_controller_spec.rb | |
parent | 92bb16624632beb490bb84a51b9a868d4b71eb6a (diff) |
Clean up for api/base controller (#3629)
* Move ApiController to Api/BaseController * API controllers inherit from Api::BaseController * Add coverage for various error cases in api/base controller
Diffstat (limited to 'spec/controllers/api_controller_spec.rb')
-rw-r--r-- | spec/controllers/api_controller_spec.rb | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/spec/controllers/api_controller_spec.rb b/spec/controllers/api_controller_spec.rb deleted file mode 100644 index 44be4276a..000000000 --- a/spec/controllers/api_controller_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -require 'rails_helper' - -describe ApiController, type: :controller do - controller do - def success - head 200 - end - end - - before do - routes.draw { post 'success' => 'api#success' } - end - - it 'does not protect from forgery' do - ActionController::Base.allow_forgery_protection = true - post 'success' - expect(response).to have_http_status(:success) - end -end |