summaryrefslogtreecommitdiff
path: root/spec/requests/companies_controller/index_companies_controller_spec.rb
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2023-03-14 20:19:13 -0600
committerHombreLaser <sebastian-440@live.com>2023-03-14 20:19:13 -0600
commit8c847a682109e8305ff1ac14cd493255884d8675 (patch)
treeaeb269def99e61e69223d84c532187de0a20cef5 /spec/requests/companies_controller/index_companies_controller_spec.rb
parent5a367387cfec9c2a152c6aeba765ee5ba42e03af (diff)
Añade specs faltantes de CompaniesController
Diffstat (limited to 'spec/requests/companies_controller/index_companies_controller_spec.rb')
-rw-r--r--spec/requests/companies_controller/index_companies_controller_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/requests/companies_controller/index_companies_controller_spec.rb b/spec/requests/companies_controller/index_companies_controller_spec.rb
new file mode 100644
index 0000000..c8fb439
--- /dev/null
+++ b/spec/requests/companies_controller/index_companies_controller_spec.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+require 'rails_helper'
+
+RSpec.describe 'GET /api/companies', type: :request do
+ before(:each) do
+ create_list(:company, 12)
+ end
+
+ it_behaves_like 'a GET index request' do
+ let(:headers) { {} }
+ let(:companies) { create_list(:company, 12) }
+ let(:route) { '/api/companies' }
+ let(:pagination_size) { 10 }
+ end
+end