0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-22 09:20:29 +01:00

Add failing test

Dieser Commit ist enthalten in:
Angus McLeod 2023-02-06 17:31:42 +01:00
Ursprung 794a8efdec
Commit 735d43e1ee

Datei anzeigen

@ -42,5 +42,18 @@ describe ::TagsController, type: :request do
expect(names).to contain_exactly(*all_tag_names) expect(names).to contain_exactly(*all_tag_names)
end end
end end
context "tag group param is stored as an empty string" do
it "returns all tags" do
::RequestStore.store[:tag_groups] = ""
get "/tags/filter/search.json", params: { q: '' }
expect(response.status).to eq(200)
results = response.parsed_body['results']
names = results.map { |result| result['name'] }
all_tag_names = Tag.all.pluck(:name)
expect(names).to contain_exactly(*all_tag_names)
end
end
end end
end end