Use match_array instead of eq to ignore ordering (#5308)
This commit is contained in:
parent
d7174923a2
commit
8aa9eb3534
2 changed files with 4 additions and 4 deletions
|
|
@ -90,7 +90,7 @@ RSpec.describe Exporter::Articles, type: :service do
|
|||
exporter = valid_instance(user)
|
||||
result = exporter.export(slug: article.slug)
|
||||
articles = load_articles(result)
|
||||
expect(articles.first.keys).to eq(expected_fields)
|
||||
expect(articles.first.keys).to match_array(expected_fields)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -107,7 +107,7 @@ RSpec.describe Exporter::Articles, type: :service do
|
|||
exporter = valid_instance(article.user)
|
||||
result = exporter.export
|
||||
articles = load_articles(result)
|
||||
expect(articles.first.keys).to eq(expected_fields)
|
||||
expect(articles.first.keys).to match_array(expected_fields)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ RSpec.describe Exporter::Comments, type: :service do
|
|||
exporter = valid_instance(user)
|
||||
result = exporter.export(id_code: comment.id_code)
|
||||
comments = load_comments(result)
|
||||
expect(comments.first.keys).to eq(expected_fields)
|
||||
expect(comments.first.keys).to match_array(expected_fields)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -91,7 +91,7 @@ RSpec.describe Exporter::Comments, type: :service do
|
|||
exporter = valid_instance(comment.user)
|
||||
result = exporter.export
|
||||
comments = load_comments(result)
|
||||
expect(comments.first.keys).to eq(expected_fields)
|
||||
expect(comments.first.keys).to match_array(expected_fields)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue