Skip to content

Commit

Permalink
rspec fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
bmhughes committed Oct 11, 2023
1 parent 3e2de6e commit 9052c3a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libraries/helpers_json.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def prune_generate_json(dangling:, prune_until: nil, with_label: nil, without_la
opts['label!'] = { "#{without_label}": true } if without_label
opts['all'] = true if all

'filters=' + URI.encode_www_form_component(opts.to_jso)
'filters=' + URI.encode_www_form_component(opts.to_json)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/libraries/image_prune_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class DummyClass < Chef::Node
without_label = 'no_prune'
expected = 'filters=%7B%22dangling%22%3A%7B%22true%22%3Atrue%7D%2C%22until%22%3A%7B%221h30m%22%3Atrue%7D%2C%22label%22%3A%7B%22com.example.vendor%3DACME%22%3Atrue%7D%2C%22label%21%22%3A%7B%22no_prune%22%3Atrue%7D%7D'

expect(subject.generate_json(dangling, prune_until, with_label, without_label)).to eq(expected)
expect(subject.prune_generate_json(dangling: dangling, prune_until: prune_until, with_label: with_label, without_label: without_label)).to eq(expected)
end
end
end

0 comments on commit 9052c3a

Please sign in to comment.