Skip to content

Commit 6b724d5

Browse files
committed
chore: remove some unrelated changes
1 parent 47c7a90 commit 6b724d5

File tree

3 files changed

+1
-19
lines changed

3 files changed

+1
-19
lines changed

app/controllers/admin/chapters/organisers_controller.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ def index
1212
def create
1313
authorize :organiser
1414

15-
if params[:organiser].blank? || params[:organiser][:organiser].blank?
16-
flash[:alert] = 'Please select a member to make organiser.'
17-
redirect_to admin_chapter_organisers_path(@chapter) and return
18-
end
19-
2015
member = Member.find(params[:organiser][:organiser])
2116
member.add_role(:organiser, @chapter)
2217

app/views/layouts/_messages.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
- unless (name.eql?('notice') && @suppress_notices) || (name.eql?('warning') && @suppress_warnings)
33
- name = name.eql?('notice') ? 'info' : name
44
- if msg.is_a?(String)
5-
.alert.alert-dismissible.fade.show.mb-0.text-center.bg-warning{ 'data-alert': '', class: "alert-#{name}", role: 'alert' }
5+
.alert.alert-dismissible.fade.show.mb-0{ 'data-alert': '', class: "alert-#{name}", role: 'alert' }
66
= content_tag :div, msg.html_safe
77
%button.btn-close{ type: 'button', 'data-bs-dismiss': 'alert', 'aria-label': 'Close' }
88
- elsif msg.is_a?(Array)

spec/features/admin/managing_organisers_spec.rb

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,6 @@
3939
end
4040
end
4141

42-
scenario 'show flash alert warning message if user clicks add organiser without selecting an organiser from the dropdown' do
43-
chapter_subscriber = Fabricate(:member)
44-
chapter = Fabricate(:chapter_with_groups)
45-
Fabricate(:subscription, member: chapter_subscriber, group: chapter.groups.first)
46-
visit admin_chapter_organisers_path(chapter)
47-
48-
click_on 'Add organiser'
49-
50-
expect(page).to have_content('Please select a member to make organiser.')
51-
expect(current_path).to eq(admin_chapter_organisers_path(chapter))
52-
expect(page.status_code).to eq(200)
53-
end
54-
5542
scenario 'can remove an organiser from a chapter' do
5643
visit admin_chapter_organisers_path(chapter)
5744
organiser_name = chapter.organisers.first.full_name

0 commit comments

Comments
 (0)