From 9a52e25a326c75112fd392e3ea4b5f211527f511 Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Tue, 21 Feb 2023 20:08:07 -0600 Subject: AƱade el spec del controlador de usuarios MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/api/user_accounts_controller.rb | 2 ++ spec/controllers/user_accounts_controller_spec.rb | 7 +++++++ 2 files changed, 9 insertions(+) create mode 100644 spec/controllers/user_accounts_controller_spec.rb diff --git a/app/controllers/api/user_accounts_controller.rb b/app/controllers/api/user_accounts_controller.rb index 36359e5..0825d33 100644 --- a/app/controllers/api/user_accounts_controller.rb +++ b/app/controllers/api/user_accounts_controller.rb @@ -14,6 +14,8 @@ module Api render json: Serializers::UserAccountSerializer.new(@user_account).serializable_hash end + # TODO: Must set authentication before defining the show method. + private def permitted_params diff --git a/spec/controllers/user_accounts_controller_spec.rb b/spec/controllers/user_accounts_controller_spec.rb new file mode 100644 index 0000000..d5eefca --- /dev/null +++ b/spec/controllers/user_accounts_controller_spec.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe Api::UserAccountsController, type: :controller do + it { should route(:post, '/api/user_accounts').to(action: :create) } +end -- cgit v1.2.3