mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 11:03:40 +08:00
DEV: Fix flakey assertion in test (#20011)
This assertion was failing in internal builds. I can repro locally if I set `foobarbaz` to be created after `quxbarbaz`. For now, I think this complication in the test is unnecessary, hence this removes the `quxbarbaz` case.
This commit is contained in:
parent
c186a46910
commit
60990aab55
|
@ -275,8 +275,6 @@ RSpec.describe HashtagsController do
|
|||
|
||||
qux = Fabricate(:category_with_definition, slug: "qux")
|
||||
quxbar = Fabricate(:category_with_definition, slug: "bar", parent_category_id: qux.id)
|
||||
quxbarbaz =
|
||||
Fabricate(:category_with_definition, slug: "baz", parent_category_id: quxbar.id)
|
||||
|
||||
invalid_slugs = [":"]
|
||||
child_slugs = %w[bar baz]
|
||||
|
@ -299,7 +297,7 @@ RSpec.describe HashtagsController do
|
|||
foobar.url,
|
||||
)
|
||||
expect(found_categories.find { |c| c["ref"] == "bar:baz" }["relative_url"]).to eq(
|
||||
foobarbaz.id < quxbarbaz.id ? foobarbaz.url : quxbarbaz.url,
|
||||
foobarbaz.url,
|
||||
)
|
||||
expect(found_categories.find { |c| c["ref"] == "qux" }["relative_url"]).to eq(qux.url)
|
||||
expect(found_categories.find { |c| c["ref"] == "qux:bar" }["relative_url"]).to eq(
|
||||
|
|
Loading…
Reference in New Issue
Block a user