diff options
author | HombreLaser <sebastian-440@live.com> | 2023-03-30 18:00:37 -0600 |
---|---|---|
committer | HombreLaser <sebastian-440@live.com> | 2023-03-30 18:00:37 -0600 |
commit | 564203bace85c06d0de16ad5d6c2ac540642d84e (patch) | |
tree | 2fa202a85147316df065957a29126c08dc140940 /spec/requests/cards_controller/index_spec.rb | |
parent | 2ae0cd8a8dc6d630ee1a7a84ddf6111609dbdeb7 (diff) |
Añade specs de CardsController
Diffstat (limited to 'spec/requests/cards_controller/index_spec.rb')
-rw-r--r-- | spec/requests/cards_controller/index_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/requests/cards_controller/index_spec.rb b/spec/requests/cards_controller/index_spec.rb index e69de29..d88b28c 100644 --- a/spec/requests/cards_controller/index_spec.rb +++ b/spec/requests/cards_controller/index_spec.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe 'GET /api/account/cards', type: :request do + let(:user) { create(:user_account, role: 'regular') } + let(:token) { jwt(user) } + + before(:each) do + create_list(:card, 3, user_account: user) + end + + it_behaves_like 'a GET index request' do + let(:headers) { { 'Authorization' => "Bearer #{token['token']}" } } + let(:route) { '/api/account/cards' } + let(:pagination_size) { 3 } + end +end |