Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-26 02:50:28 +01:00
Add failing test
Dieser Commit ist enthalten in:
Ursprung
794a8efdec
Commit
735d43e1ee
1 geänderte Dateien mit 13 neuen und 0 gelöschten Zeilen
|
@ -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
|
||||||
|
|
Laden …
In neuem Issue referenzieren