Skip to content

Commit

Permalink
Prettify
Browse files Browse the repository at this point in the history
  • Loading branch information
andershagbard committed Oct 16, 2023
1 parent 4c45606 commit 5ea58aa
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions test/integration/standard_filter_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,11 @@ def test_sort

def test_sort_deep_default_separator
input = [
{ "foo" => { "price" => 4, "handle" => "alpha" } } ,
{ "foo" => { "handle" => "beta" } } ,
{ "foo" => { "price" => 1, "handle" => "gamma" } } ,
{ "foo" => { "handle" => "delta" } } ,
{ "foo" => { "price" => 2, "handle" => "epsilon" } } ,
{ "foo" => { "price" => 4, "handle" => "alpha" } },
{ "foo" => { "handle" => "beta" } },
{ "foo" => { "price" => 1, "handle" => "gamma" } },
{ "foo" => { "handle" => "delta" } },
{ "foo" => { "price" => 2, "handle" => "epsilon" } },
]
expectation = [
{ "foo" => { "price" => 1, "handle" => "gamma" } },
Expand All @@ -285,11 +285,11 @@ def test_sort_deep_default_separator

def test_sort_deep_custom_separator
input = [
{ "foo" => { "price" => 4, "handle" => "alpha" } } ,
{ "foo" => { "handle" => "beta" } } ,
{ "foo" => { "price" => 1, "handle" => "gamma" } } ,
{ "foo" => { "handle" => "delta" } } ,
{ "foo" => { "price" => 2, "handle" => "epsilon" } } ,
{ "foo" => { "price" => 4, "handle" => "alpha" } },
{ "foo" => { "handle" => "beta" } },
{ "foo" => { "price" => 1, "handle" => "gamma" } },
{ "foo" => { "handle" => "delta" } },
{ "foo" => { "price" => 2, "handle" => "epsilon" } },
]
expectation = [
{ "foo" => { "price" => 1, "handle" => "gamma" } },
Expand Down Expand Up @@ -529,13 +529,13 @@ def test_uniq_invalid_property

def test_uniq_deep_default_separator
input = [
{ "foo" => { "bar" => "baz", "handle" => "alpha" } } ,
{ "foo" => { "bar" => "baz", "handle" => "beta" } } ,
{ "foo" => { "bar" => "qux", "handle" => "charlie" } } ,
{ "foo" => { "bar" => "baz", "handle" => "alpha" } },
{ "foo" => { "bar" => "baz", "handle" => "beta" } },
{ "foo" => { "bar" => "qux", "handle" => "charlie" } },
]
expectation = [
{ "foo" => { "bar" => "baz", "handle" => "alpha" } } ,
{ "foo" => { "bar" => "qux", "handle" => "charlie" } } ,
{ "foo" => { "bar" => "baz", "handle" => "alpha" } },
{ "foo" => { "bar" => "qux", "handle" => "charlie" } },
]
assert_equal(expectation, @filters.uniq(input, "foo.bar", { "deep" => true }))
end
Expand Down

0 comments on commit 5ea58aa

Please sign in to comment.