mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-23 06:16:42 +00:00
stub controller to help with future testing
This commit is contained in:
parent
8d673068af
commit
b37c7905cd
2
test-app/app/assets/javascripts/stubs.js
Normal file
2
test-app/app/assets/javascripts/stubs.js
Normal file
@ -0,0 +1,2 @@
|
||||
// Place all the behaviors and hooks related to the matching controller here.
|
||||
// All this logic will automatically be available in application.js.
|
||||
4
test-app/app/assets/stylesheets/stubs.css
Normal file
4
test-app/app/assets/stylesheets/stubs.css
Normal file
@ -0,0 +1,4 @@
|
||||
/*
|
||||
Place all the styles related to the matching controller here.
|
||||
They will automatically be included in application.css.
|
||||
*/
|
||||
9
test-app/app/controllers/stubs_controller.rb
Normal file
9
test-app/app/controllers/stubs_controller.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class StubsController < ApplicationController
|
||||
def index
|
||||
render plain: 'OK'
|
||||
end
|
||||
|
||||
def show
|
||||
render plain: 'OK'
|
||||
end
|
||||
end
|
||||
2
test-app/app/helpers/stubs_helper.rb
Normal file
2
test-app/app/helpers/stubs_helper.rb
Normal file
@ -0,0 +1,2 @@
|
||||
module StubsHelper
|
||||
end
|
||||
@ -9,6 +9,8 @@ TestApp::Application.routes.draw do
|
||||
post 'auth-tests/api-key', to: 'auth_tests#api_key'
|
||||
post 'auth-tests/basic-and-api-key', to: 'auth_tests#basic_and_api_key'
|
||||
|
||||
resources :stubs
|
||||
|
||||
mount Rswag::Api::Engine => 'api-docs'
|
||||
mount Rswag::Ui::Engine => 'api-docs'
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user