Skip to content
This repository was archived by the owner on Jun 2, 2021. It is now read-only.

Commit fc69163

Browse files
author
Brian Butz
committed
Ensure credential binding tests create bindings with consistent timestamps
1 parent 36b6cc2 commit fc69163

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

spec/request/service_credential_bindings_spec.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88
let(:other_space) { VCAP::CloudController::Space.make }
99

1010
describe 'GET /v3/service_credential_bindings' do
11+
let(:now) { Time.now }
1112
let(:instance) { VCAP::CloudController::ManagedServiceInstance.make(space: space) }
1213
let(:other_instance) { VCAP::CloudController::ManagedServiceInstance.make(space: other_space) }
13-
let!(:key_binding) { VCAP::CloudController::ServiceKey.make(service_instance: instance) }
14-
let!(:other_key_binding) { VCAP::CloudController::ServiceKey.make(service_instance: other_instance) }
15-
let!(:app_binding) { VCAP::CloudController::ServiceBinding.make(service_instance: instance) }
16-
let!(:other_app_binding) { VCAP::CloudController::ServiceBinding.make(service_instance: other_instance) }
14+
let!(:key_binding) { VCAP::CloudController::ServiceKey.make(service_instance: instance, created_at: now - 4.seconds) }
15+
let!(:other_key_binding) { VCAP::CloudController::ServiceKey.make(service_instance: other_instance, created_at: now - 3.seconds) }
16+
let!(:app_binding) { VCAP::CloudController::ServiceBinding.make(service_instance: instance, created_at: now - 2.seconds) }
17+
let!(:other_app_binding) { VCAP::CloudController::ServiceBinding.make(service_instance: other_instance, created_at: now - 1.second) }
1718

1819
describe 'permissions' do
1920
let(:api_call) { ->(user_headers) { get '/v3/service_credential_bindings', nil, user_headers } }

0 commit comments

Comments
 (0)