Skip to content

Commit 3e5c963

Browse files
authored
4941 Remove unused and broken shared not signed auth specs (#5480)
1 parent bddc765 commit 3e5c963

13 files changed

+0
-167
lines changed

spec/controllers/donation_sites_controller_spec.rb

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,5 @@
3939
expect(subject).to be_successful
4040
end
4141
end
42-
43-
context "Looking at a different organization" do
44-
let(:object) { create(:donation_site, organization: create(:organization)) }
45-
include_examples "requiring authorization"
46-
end
47-
end
48-
49-
context "While not signed in" do
50-
let(:object) { create(:donation_site) }
51-
52-
include_examples "requiring authorization"
5342
end
5443
end

spec/controllers/items_controller_spec.rb

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,6 @@
198198
end
199199
end
200200

201-
context "Looking at a different organization" do
202-
let(:object) { create(:item, organization: create(:organization)) }
203-
include_examples "requiring authorization"
204-
end
205-
206201
describe "PATCH #remove_category" do
207202
let(:item_category) { create(:item_category) }
208203
let!(:item) { create(:item, item_category: item_category) }
@@ -220,10 +215,4 @@
220215
end
221216
end
222217
end
223-
224-
context "While not signed in" do
225-
let(:object) { create(:item) }
226-
227-
include_examples "requiring authorization"
228-
end
229218
end

spec/controllers/transfers_controller_spec.rb

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -128,22 +128,5 @@
128128
end
129129
end
130130
end
131-
132-
context "Looking at a different organization" do
133-
let(:object) do
134-
org = create(:organization)
135-
create(:transfer,
136-
to: create(:storage_location, organization: org),
137-
from: create(:storage_location, organization: org),
138-
organization: org)
139-
end
140-
include_examples "requiring authorization", except: %i(edit update destroy)
141-
end
142-
end
143-
144-
context "While not signed in" do
145-
let(:object) { create(:transfer) }
146-
147-
include_examples "requiring authorization", except: %i(edit update destroy)
148131
end
149132
end

spec/requests/barcode_items_requests_spec.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,6 @@
123123
expect(subject).to redirect_to(barcode_items_path)
124124
end
125125
end
126-
127-
context "Looking at a different organization" do
128-
let(:object) { create(:barcode_item, organization: create(:organization)) }
129-
include_examples "requiring authorization"
130-
end
131126
end
132127

133128
context 'while signed in as organization admin' do

spec/requests/distributions_requests_spec.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -550,11 +550,6 @@
550550
include_examples "restricts access to organization users/admins"
551551
end
552552

553-
context "Looking at a different organization" do
554-
let(:object) { create(:distribution, organization: create(:organization)) }
555-
include_examples "requiring authorization"
556-
end
557-
558553
describe "PATCH #update" do
559554
subject { patch distribution_path(distribution_params) }
560555
let(:partner_name) { "Patrick" }
@@ -939,8 +934,6 @@
939934
context "While not signed in" do
940935
let(:object) { create(:distribution) }
941936

942-
include_examples "requiring authorization"
943-
944937
# calendar does not need signin
945938
describe 'GET #calendar' do
946939
before(:each) do

spec/requests/events_requests_spec.rb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -265,13 +265,4 @@
265265
end
266266
end
267267
end
268-
269-
context "When not signed in" do
270-
let(:object) do
271-
donation = create(:donation)
272-
DonationEvent.publish(donation)
273-
end
274-
275-
include_examples "requiring authorization"
276-
end
277268
end

spec/requests/partner_groups_requests_spec.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,4 @@
112112
end
113113
end
114114
end
115-
116-
context "While not signed in" do
117-
let(:object) { create(:partner_group, organization: organization) }
118-
119-
include_examples "requiring authorization"
120-
end
121115
end

spec/requests/product_drive_participants_requests_spec.rb

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -131,16 +131,5 @@
131131
expect(response).to have_error(/try again/i)
132132
end
133133
end
134-
135-
context "Looking at a different organization" do
136-
let(:object) { create(:product_drive_participant, organization: create(:organization)) }
137-
include_examples "requiring authorization"
138-
end
139-
end
140-
141-
context "While not signed in" do
142-
let(:object) { create(:product_drive_participant) }
143-
144-
include_examples "requiring authorization"
145134
end
146135
end

spec/requests/requests_requests_spec.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,4 @@
170170
end
171171
end
172172
end
173-
174-
context 'When not signed' do
175-
let(:object) { create(:request) }
176-
177-
include_examples 'requiring authorization'
178-
end
179173
end

spec/requests/storage_locations_requests_spec.rb

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -560,16 +560,5 @@ def item_to_h(view_item)
560560
expect(response.body).to include("Square footage must be greater than or equal to 0")
561561
end
562562
end
563-
564-
context "Looking at a different organization" do
565-
let(:object) { create(:storage_location, organization: create(:organization)) }
566-
include_examples "requiring authorization"
567-
end
568-
end
569-
570-
context "While not signed in" do
571-
let(:object) { create(:storage_location) }
572-
573-
include_examples "requiring authorization"
574563
end
575564
end

0 commit comments

Comments
 (0)