DEV: Ignore order of categories in search spec.
This commit is contained in:
parent
1e9ce51151
commit
8ceb7f490f
|
@ -639,8 +639,8 @@ describe Search do
|
||||||
it "should return the right categories" do
|
it "should return the right categories" do
|
||||||
search = Search.execute("monkey")
|
search = Search.execute("monkey")
|
||||||
|
|
||||||
expect(search.categories).to eq(
|
expect(search.categories).to contain_exactly(
|
||||||
[category, ignored_category]
|
category, ignored_category
|
||||||
)
|
)
|
||||||
|
|
||||||
expect(search.posts).to eq([category.topic.first_post, post])
|
expect(search.posts).to eq([category.topic.first_post, post])
|
||||||
|
@ -683,12 +683,12 @@ describe Search do
|
||||||
expect(search.posts.map(&:id)).to eq([post2.id, post.id])
|
expect(search.posts.map(&:id)).to eq([post2.id, post.id])
|
||||||
|
|
||||||
category.set_permissions({})
|
category.set_permissions({})
|
||||||
category.save
|
category.save!
|
||||||
search = Search.execute("monkey")
|
search = Search.execute("monkey")
|
||||||
|
|
||||||
expect(search.categories).to eq([
|
expect(search.categories).to contain_exactly(
|
||||||
ignored_category, child_of_ignored_category
|
ignored_category, child_of_ignored_category
|
||||||
])
|
)
|
||||||
|
|
||||||
expect(search.posts.map(&:id)).to eq([
|
expect(search.posts.map(&:id)).to eq([
|
||||||
child_of_ignored_category.topic.first_post,
|
child_of_ignored_category.topic.first_post,
|
||||||
|
|
Loading…
Reference in New Issue