From b37c7905cd0154042aa39a8b94ba570a445ea694 Mon Sep 17 00:00:00 2001 From: Jamie Macey Date: Mon, 12 Oct 2020 22:47:31 -0700 Subject: [PATCH] stub controller to help with future testing --- test-app/app/assets/javascripts/stubs.js | 2 ++ test-app/app/assets/stylesheets/stubs.css | 4 ++++ test-app/app/controllers/stubs_controller.rb | 9 +++++++++ test-app/app/helpers/stubs_helper.rb | 2 ++ test-app/config/routes.rb | 2 ++ 5 files changed, 19 insertions(+) create mode 100644 test-app/app/assets/javascripts/stubs.js create mode 100644 test-app/app/assets/stylesheets/stubs.css create mode 100644 test-app/app/controllers/stubs_controller.rb create mode 100644 test-app/app/helpers/stubs_helper.rb diff --git a/test-app/app/assets/javascripts/stubs.js b/test-app/app/assets/javascripts/stubs.js new file mode 100644 index 0000000..dee720f --- /dev/null +++ b/test-app/app/assets/javascripts/stubs.js @@ -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. diff --git a/test-app/app/assets/stylesheets/stubs.css b/test-app/app/assets/stylesheets/stubs.css new file mode 100644 index 0000000..afad32d --- /dev/null +++ b/test-app/app/assets/stylesheets/stubs.css @@ -0,0 +1,4 @@ +/* + Place all the styles related to the matching controller here. + They will automatically be included in application.css. +*/ diff --git a/test-app/app/controllers/stubs_controller.rb b/test-app/app/controllers/stubs_controller.rb new file mode 100644 index 0000000..7a4acd9 --- /dev/null +++ b/test-app/app/controllers/stubs_controller.rb @@ -0,0 +1,9 @@ +class StubsController < ApplicationController + def index + render plain: 'OK' + end + + def show + render plain: 'OK' + end +end diff --git a/test-app/app/helpers/stubs_helper.rb b/test-app/app/helpers/stubs_helper.rb new file mode 100644 index 0000000..7ae9034 --- /dev/null +++ b/test-app/app/helpers/stubs_helper.rb @@ -0,0 +1,2 @@ +module StubsHelper +end diff --git a/test-app/config/routes.rb b/test-app/config/routes.rb index 038f728..3107e95 100644 --- a/test-app/config/routes.rb +++ b/test-app/config/routes.rb @@ -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