-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug/1476/redirect to self registration (#1476)
* Add spec * Redirect to self registration * Fix rubocop
- Loading branch information
Showing
3 changed files
with
23 additions
and
6 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
18 changes: 18 additions & 0 deletions
18
spec/controllers/groups/self_inscription_controller_spec.rb
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,18 @@ | ||
# frozen_string_literal: true | ||
|
||
# Copyright (c) 2012-2024, Schweizer Alpen-Club. This file is part of | ||
# hitobito_sac_cas and licensed under the Affero General Public License version 3 | ||
# or later. See the COPYING file at the top-level directory or at | ||
# https://github.com/hitobito/hitobito_sac_cas. | ||
|
||
require "spec_helper" | ||
|
||
describe Groups::SelfInscriptionController do | ||
let(:group) { groups(:bluemlisalp_neuanmeldungen_sektion) } | ||
|
||
it "redirects to login" do | ||
sign_in(people(:mitglied)) | ||
get :show, params: {group_id: group.id} | ||
expect(response).to redirect_to group_self_registration_path | ||
end | ||
end |