From ade041c98dbc7bdf0fec8e3ba3df4545a7278a02 Mon Sep 17 00:00:00 2001 From: d036670 Date: Sat, 18 Nov 2023 16:00:07 +0100 Subject: [PATCH] some more tests coverage should be ok with that --- spec/client_reg_spec.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/spec/client_reg_spec.rb b/spec/client_reg_spec.rb index 706def4..417f5f5 100644 --- a/spec/client_reg_spec.rb +++ b/spec/client_reg_spec.rb @@ -88,8 +88,12 @@ module CF::UAA it "fails to get client" do Cli.run("token client get #{@test_client} -s #{@test_secret}").should be - Cli.run("token client get not-existing -s secret").should be_nil - Cli.output.string.should include 'invalid_client' + Cli.run("context #{@admin_client}").should be + Cli.run("client get #{@test_client}").should be + Cli.run("client get #{@test_client} -a id").should be + Cli.output.string.should include 'id' + Cli.run("client get not-existing").should be_nil + Cli.output.string.should include 'NotFound' end context 'as updated client' do @@ -98,10 +102,11 @@ module CF::UAA # update the test client as the admin client Cli.run("token client get #{@test_client} -s #{@test_secret}").should be Cli.run("context #{@admin_client}").should be - Cli.run("client update #{@test_client} --authorities scim.write,scim.read").should be + Cli.run("client update #{@test_client} --authorities scim.write,scim.read --required_user_groups openid").should be Cli.output.string.should include 'created_by' Cli.run("client get #{@test_client}").should be Cli.output.string.should include 'scim.read', 'scim.write' + Cli.output.string.should include 'required_user_groups' end it 'fails to create a user account with old token' do