Skip to content

Commit

Permalink
SPEC: add test to check group memberships after TL change. (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
vinothkannans authored May 16, 2024
1 parent df65a68 commit b465ff9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions spec/saml_authenticator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,15 @@ def auth_hash(attributes)
it "user should have trust level 3 (default param)" do
hash = auth_hash("trustLevel" => [3])
result = @authenticator.after_authenticate(hash)
expect(result.user.trust_level).to eq(3)
expect(result.user.manual_locked_trust_level).to eq(3)
user = result.user

expect(user.trust_level).to eq(3)
expect(user.manual_locked_trust_level).to eq(3)
expect(user.groups.pluck(:name)).to include(
"trust_level_1",
"trust_level_2",
"trust_level_3",
)
end

it "user should have trust level 3 (using specified saml_trust_level_attribute)" do
Expand Down

0 comments on commit b465ff9

Please sign in to comment.