# frozen_string_literal: true require 'rails_helper' RSpec.describe 'GET /api/account/addresses', type: :request do let(:user) { create(:user_account, role: 'regular') } let(:token) { jwt(user) } before(:each) do create_list(:address, 5) relate_user_and_addresses(user, Address.all) end it_behaves_like 'a GET index request' do let(:headers) { { 'Authorization' => "Bearer #{token['token']}" } } let(:route) { '/api/account/addresses' } let(:pagination_size) { 5 } end end