BigW Consortium Gitlab

Isolate CheckGcpProjectBillingWorker specreturns

parent 68b95cd0
......@@ -12,12 +12,13 @@ describe CheckGcpProjectBillingWorker do
end
it 'stores billing status in redis' do
redis_double = double
expect(CheckGcpProjectBillingService).to receive_message_chain(:new, :execute).and_return(true)
subject
expect(Gitlab::Redis::SharedState).to receive(:with).and_yield(redis_double)
expect(redis_double).to receive(:set).with(CheckGcpProjectBillingWorker.redis_shared_state_key_for(token), anything)
Gitlab::Redis::SharedState.with do |redis|
expect(redis.get("gitlab:gcp:#{token}:billing_enabled")).to eq('true')
end
subject
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment