Skip to content

Commit 57b0eed

Browse files
committed
Fixup: search specs failing because of recent updates
The behaviour of the search page changed, the tests weren't updated
1 parent 4b29e60 commit 57b0eed

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

spec/requests/topics_spec.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,16 +205,14 @@ def attach_verified_alias(user, email:, primary: true)
205205
context "without search query" do
206206
it "shows search form" do
207207
get search_topics_path
208-
expect(response).to have_http_status(:success)
209-
expect(response.body).to include("Search the PostgreSQL Hackers Archive")
208+
expect(response).to redirect_to(topics_path(anchor: "search"))
210209
end
211210
end
212211

213212
context "with empty search query" do
214213
it "shows search form" do
215214
get search_topics_path, params: { q: " " }
216-
expect(response).to have_http_status(:success)
217-
expect(response.body).to include("Search the PostgreSQL Hackers Archive")
215+
expect(response).to redirect_to(topics_path(anchor: "search"))
218216
end
219217
end
220218

0 commit comments

Comments
 (0)