Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
SeleniumHQ
GitHub Repository: SeleniumHQ/Selenium
Path: blob/trunk/rb/spec/unit/selenium/webdriver/common/fedcm/account_spec.rb
1865 views
1
# frozen_string_literal: true
2
3
# Licensed to the Software Freedom Conservancy (SFC) under one
4
# or more contributor license agreements. See the NOTICE file
5
# distributed with this work for additional information
6
# regarding copyright ownership. The SFC licenses this file
7
# to you under the Apache License, Version 2.0 (the
8
# "License"); you may not use this file except in compliance
9
# with the License. You may obtain a copy of the License at
10
#
11
# http://www.apache.org/licenses/LICENSE-2.0
12
#
13
# Unless required by applicable law or agreed to in writing,
14
# software distributed under the License is distributed on an
15
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
# KIND, either express or implied. See the License for the
17
# specific language governing permissions and limitations
18
# under the License.
19
20
require File.expand_path('../../spec_helper', __dir__)
21
22
module Selenium
23
module WebDriver
24
module FedCM
25
describe Account do
26
let(:account) do
27
described_class.new(
28
'accountId' => '12341234',
29
'email' => '[email protected]',
30
'name' => 'Real Name',
31
'givenName' => 'Fake Name',
32
'pictureUrl' => 'picture-url',
33
'idpConfigUrl' => 'idp-config-url',
34
'loginState' => 'login-state',
35
'termsOfServiceUrl' => 'terms-of-service-url',
36
'privacyPolicyUrl' => 'privacy-policy-url'
37
)
38
end
39
40
it 'sets the provided attributes' do
41
expect(account.account_id).to eq('12341234')
42
expect(account.email).to eq('[email protected]')
43
expect(account.name).to eq('Real Name')
44
expect(account.given_name).to eq('Fake Name')
45
expect(account.picture_url).to eq('picture-url')
46
expect(account.idp_config_url).to eq('idp-config-url')
47
expect(account.login_state).to eq('login-state')
48
expect(account.terms_of_service_url).to eq('terms-of-service-url')
49
expect(account.privacy_policy_url).to eq('privacy-policy-url')
50
end
51
end # Account
52
end # FedCM
53
end # WebDriver
54
end # Selenium
55
56