There will be about 1h of downtime on 2020-03-02 at 13:00 UTC+1 (change of servers and upgrade to Heptapod 0.20.0 final)

Commit edf4c506 authored by Georges Racinet's avatar Georges Racinet 🦑

Trigger API scope: fixed RSpec tests

They were failing for ordering reasons only, and this
slept through in the publication of the topic introducing
the new scope.

--HG--
branch : heptapod-stable
parent 960ce091e6fc
......@@ -8,7 +8,7 @@
describe 'constants' do
it 'API_SCOPES contains all scopes for API access' do
expect(subject::API_SCOPES).to eq %i[api read_user read_api api_trigger]
expect(subject::API_SCOPES).to eq %i[api read_user read_api trigger_api]
end
it 'ADMIN_SCOPES contains all scopes for ADMIN access' do
......@@ -30,7 +30,7 @@
it 'optional_scopes contains all non-default scopes' do
stub_container_registry_config(enabled: true)
expect(subject.optional_scopes).to eq %i[trigger_api read_user read_api read_repository write_repository read_registry write_registry sudo openid profile email]
expect(subject.optional_scopes).to eq %i[read_user read_api trigger_api read_repository write_repository read_registry write_registry sudo openid profile email]
end
end
......@@ -38,21 +38,21 @@
it 'contains all non-default scopes' do
stub_container_registry_config(enabled: true)
expect(subject.all_available_scopes).to eq %i[api trigger_api read_user read_api read_repository write_repository read_registry write_registry sudo]
expect(subject.all_available_scopes).to eq %i[api read_user read_api trigger_api read_repository write_repository read_registry write_registry sudo]
end
it 'contains for non-admin user all non-default scopes without ADMIN access' do
stub_container_registry_config(enabled: true)
user = create(:user, admin: false)
expect(subject.available_scopes_for(user)).to eq %i[api trigger_api read_user read_api read_repository write_repository read_registry write_registry]
expect(subject.available_scopes_for(user)).to eq %i[api read_user read_api trigger_api read_repository write_repository read_registry write_registry]
end
it 'contains for admin user all non-default scopes with ADMIN access' do
stub_container_registry_config(enabled: true)
user = create(:user, admin: true)
expect(subject.available_scopes_for(user)).to eq %i[api trigger_api read_user read_api read_repository write_repository read_registry write_registry sudo]
expect(subject.available_scopes_for(user)).to eq %i[api read_user read_api trigger_api read_repository write_repository read_registry write_registry sudo]
end
context 'registry_scopes' do
......
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