Skip to content

Commit

Permalink
add Model.delete_manifest (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
gimmyxd authored Jun 7, 2024
1 parent c916da9 commit c61ff4e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/aserto/directory/v3/model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ def set_manifest(body)
end

# rubocop:enable Naming/AccessorMethodName

# Deletes the manifest and all the data
# @return [Aserto::Directory::Model::V3::DeleteManifestResponse]
def delete_manifest
@model.delete_manifest(Model::V3::DeleteManifestRequest.new)
end
end
end
end
Expand Down
10 changes: 10 additions & 0 deletions spec/integration/directory_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,16 @@
YAML
end

it "deletes the manifest" do
expect do
directory.delete_manifest
end.not_to raise_error
end

it "reads the empty manifest" do
expect(directory.get_manifest.to_h[:body]).to be_nil
end

it "sets the manifest" do
expect do
directory.set_manifest(manifest)
Expand Down

0 comments on commit c61ff4e

Please sign in to comment.