-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add tos_agreement and privacy terms on registration
tackling GDPR Stuff #13 .
- Loading branch information
Showing
6 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# SPDX-FileCopyrightText: 2020 Felix Wolfsteller | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
require "application_system_test_case" | ||
require 'test_helper' | ||
|
||
class TosTest < ApplicationSystemTestCase | ||
include Devise::Test::IntegrationHelpers | ||
|
||
setup do | ||
Rack::Attack.enabled = false | ||
end | ||
|
||
test "to sign up, user has to agree to TOS and have readprivacy statement" do | ||
Rack::Attack.enabled = false | ||
|
||
visit new_user_registration_url | ||
|
||
fill_in "E-Mail", with: '[email protected]' | ||
fill_in "Passwort", with: '[email protected]' | ||
fill_in "Passwortbestätigung", with: '[email protected]' | ||
|
||
click_on "Für Schnupperwoche registrieren" | ||
|
||
assert_selector '#error_explanation' | ||
|
||
check('Datenschutzhinweise gelesen') | ||
|
||
fill_in "Passwort", with: '[email protected]' | ||
fill_in "Passwortbestätigung", with: '[email protected]' | ||
|
||
click_on "Für Schnupperwoche registrieren" | ||
|
||
assert_selector '#error_explanation' | ||
|
||
check('Stimme AGB zu') | ||
|
||
fill_in "Passwort", with: '[email protected]' | ||
fill_in "Passwortbestätigung", with: '[email protected]' | ||
|
||
click_on "Für Schnupperwoche registrieren" | ||
|
||
assert_selector '.notification', text: /Sie erhalten in wenigen Minuten/ | ||
end | ||
|
||
test "when signed up, dates of consent are saved in User model" do | ||
skip "tbi" | ||
end | ||
|
||
test "when logging in and no consent was given, user is forced to agree or delete account" do | ||
skip "tbi" | ||
end | ||
|
||
test "admins can update date of tos changes and user has to re-agree or delete account" do | ||
skip "tbi" | ||
end | ||
end | ||
|