Skip to content

Commit 841dd77

Browse files
committed
[C] Update expected rate limited code in specs
1 parent 71d5f04 commit 841dd77

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

api/db/cache_structure.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
\restrict XGxSMPRdoINWMteiaXCtwBfCSnq34zW2HRM7bIX6j0GRJUCUvjSvB7Oup6rHI7p
1+
\restrict acy6eTEdEyCwlH42B66Wg4BSGl2eqioDwK0CMSORx0X8L8IA6xc2r6aweKCXVYY
22

33
-- Dumped from database version 13.22
44
-- Dumped by pg_dump version 13.22 (Debian 13.22-1.pgdg11+1)
@@ -128,7 +128,7 @@ CREATE INDEX index_solid_cache_entries_on_key_hash_and_byte_size ON public.solid
128128
-- PostgreSQL database dump complete
129129
--
130130

131-
\unrestrict XGxSMPRdoINWMteiaXCtwBfCSnq34zW2HRM7bIX6j0GRJUCUvjSvB7Oup6rHI7p
131+
\unrestrict acy6eTEdEyCwlH42B66Wg4BSGl2eqioDwK0CMSORx0X8L8IA6xc2r6aweKCXVYY
132132

133133
SET search_path TO "$user", public;
134134

api/db/structure.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
\restrict xNcXPHOUcET17jSznOdc5dMDiBF4y4WYKle7wEyvYgrJ5dArxRQVo6kaDOXP9C1
1+
\restrict LNheIDBOnK0QpSehtUWNxnxD3q94AfOg7XcUemfZCwkIiA26sNgFEmPkBcpqG1A
22

33
-- Dumped from database version 13.22
44
-- Dumped by pg_dump version 13.22 (Debian 13.22-1.pgdg11+1)
@@ -7952,7 +7952,7 @@ ALTER TABLE ONLY public.reading_group_composite_entries
79527952
-- PostgreSQL database dump complete
79537953
--
79547954

7955-
\unrestrict xNcXPHOUcET17jSznOdc5dMDiBF4y4WYKle7wEyvYgrJ5dArxRQVo6kaDOXP9C1
7955+
\unrestrict LNheIDBOnK0QpSehtUWNxnxD3q94AfOg7XcUemfZCwkIiA26sNgFEmPkBcpqG1A
79567956

79577957
SET search_path TO "$user", public;
79587958

api/spec/requests/comments_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
end.to change(Comment, :count).by(10)
134134
.and change(ThrottledRequest, :count).by(1)
135135

136-
expect(response).to have_http_status(:service_unavailable)
136+
expect(response).to have_http_status(:too_many_requests)
137137
end
138138

139139
context "when the comment is spammy" do

api/spec/requests/reading_groups_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def making_the_request
149149
end.to change(ReadingGroup, :count).by(10)
150150
.and change(ThrottledRequest, :count).by(1)
151151

152-
expect(response).to have_http_status(:service_unavailable)
152+
expect(response).to have_http_status(:too_many_requests)
153153
end
154154

155155
context "when the user has an unconfirmed email" do

api/spec/requests/text_sections/relationships/annotations_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def make_the_request!
206206
end.to change(Annotation, :count).by(5)
207207
.and change(ThrottledRequest, :count).by(1)
208208

209-
expect(response).to have_http_status(:service_unavailable)
209+
expect(response).to have_http_status(:too_many_requests)
210210
end
211211

212212
context "when the user has not confirmed their email" do

api/spec/requests/users_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def make_request!(headers: anonymous_headers, params: valid_params)
8383
end.to change(User, :count).by(5)
8484
.and change(ThrottledRequest, :count).by(1)
8585

86-
expect(response).to have_http_status(:service_unavailable)
86+
expect(response).to have_http_status(:too_many_requests)
8787
end
8888

8989
it "tells the welcome mailer that the user was created by the admin when meta[createdByAdmin] is true" do
@@ -121,7 +121,7 @@ def make_request!(headers: anonymous_headers, params: valid_params)
121121
end.to keep_the_same(User, :count)
122122
.and change(ThrottledRequest, :count).by(1)
123123

124-
expect(response).to have_http_status(:service_unavailable)
124+
expect(response).to have_http_status(:too_many_requests)
125125
end
126126
end
127127
end

0 commit comments

Comments
 (0)