Skip to content

Commit

Permalink
test sync
Browse files Browse the repository at this point in the history
  • Loading branch information
MGibson1 committed Sep 26, 2024
1 parent f02cae2 commit efdbcb4
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions languages/ruby/spec/e2e_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,23 @@
expect(response).to equal_secret(expected_secret)
end

it 'should sync secrets' do
response = @client.secrets.sync(organization_id, nil)
expect(response).to be_an_instance_of(Hash)
expect(response['hasChanges']).to be_truthy
response['secrets'].each do |secret|
expected_secret = expected_secrets.find { |s| s['key'] == secret['key'] }
expect(secret).to equal_secret(expected_secret)
end
end

it 'should not have new sync changes' do
response = @client.secrets.sync(organization_id, Time.now.utc.strftime('%Y-%m-%dT%H:%M:%S.%6NZ'))
expect(response).to be_an_instance_of(Hash)
expect(response['hasChanges']).to be_falsey
expect(response['secrets']).to be_nil
end

after(:all) do
File.delete(@state_file) if File.exist?(@state_file)
end
Expand Down

0 comments on commit efdbcb4

Please sign in to comment.