mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 11:44:49 +08:00
FIX: flaky search-spec
More precise expectations for search spec
This commit is contained in:
parent
5af0636d83
commit
a6363170e9
|
@ -157,11 +157,11 @@ describe Search do
|
|||
SearchIndexer.index(user2, force: true)
|
||||
result = Search.execute("test", guardian: Guardian.new(user2))
|
||||
|
||||
expect(result.users.first.custom_data).to eq([
|
||||
expect(result.users.find { |u| u.id == user.id }.custom_data).to eq([
|
||||
{ name: "custom field", value: "test" },
|
||||
{ name: "another custom field", value: "longer test" }
|
||||
])
|
||||
expect(result.users.last.custom_data).to eq([
|
||||
expect(result.users.find { |u| u.id == user2.id }.custom_data).to eq([
|
||||
{ name: "another custom field", value: "second user test" }
|
||||
])
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user