@@ -27,7 +27,7 @@ module Decidim::Meetings
2727 context "with available slots" do
2828 it "creates registration and redirects" do
2929 expect do
30- post :create , params : params
30+ post :create , params :
3131 end . to change ( Registration , :count ) . by ( 1 )
3232
3333 expect ( flash [ :notice ] ) . to eq ( I18n . t ( "registrations.create.success" , scope : "decidim.meetings" ) )
@@ -36,10 +36,10 @@ module Decidim::Meetings
3636 end
3737
3838 context "when no available slots" do
39- let! ( :registrations ) { create_list ( :registration , 10 , meeting : meeting ) }
39+ let! ( :registrations ) { create_list ( :registration , 10 , meeting :) }
4040
4141 it "shows error message" do
42- post :create , params : params
42+ post ( :create , params :)
4343
4444 expect ( flash [ :alert ] ) . to eq ( I18n . t ( "registrations.create.invalid" , scope : "decidim.meetings" ) )
4545 expect ( response ) . to redirect_to ( meeting_path ( meeting ) )
@@ -49,7 +49,7 @@ module Decidim::Meetings
4949
5050 context "when user not authenticated" do
5151 it "redirects to login" do
52- post :create , params : params
52+ post ( :create , params :)
5353 expect ( response ) . to redirect_to ( "/users/sign_in" )
5454 end
5555 end
@@ -76,15 +76,15 @@ module Decidim::Meetings
7676 meeting . update! (
7777 registrations_enabled : true ,
7878 registration_form_enabled : true ,
79- questionnaire : questionnaire
79+ questionnaire :
8080 )
8181 end
8282
8383 context "with valid params" do
8484 context "when joining directly" do
8585 it "answers questionnaire and redirects" do
8686 expect do
87- post :respond , params : params
87+ post :respond , params :
8888 end . to change { meeting . registrations . count } . by ( 1 )
8989
9090 expect ( flash [ :notice ] ) . to eq ( I18n . t ( "registrations.create.success" , scope : "decidim.meetings" ) )
@@ -94,11 +94,11 @@ module Decidim::Meetings
9494
9595 context "when joining waitlist" do
9696 let ( :meeting ) { create ( :meeting , component :, available_slots : 10 ) }
97- let! ( :registrations ) { create_list ( :registration , 10 , meeting : meeting ) }
97+ let! ( :registrations ) { create_list ( :registration , 10 , meeting :) }
9898
9999 it "adds user to waitlist and redirects" do
100100 expect do
101- post :respond , params : params
101+ post :respond , params :
102102 end . to change { meeting . registrations . where ( status : :waiting_list ) . count } . by ( 1 )
103103
104104 expect ( flash [ :notice ] ) . to eq ( I18n . t ( "registrations.waitlist.success" , scope : "decidim.meetings" ) )
@@ -116,7 +116,7 @@ module Decidim::Meetings
116116 end
117117
118118 it "shows error message" do
119- post :respond , params : params
119+ post ( :respond , params :)
120120
121121 expect ( flash [ :alert ] ) . to eq ( I18n . t ( "response.invalid" , scope : "decidim.forms.questionnaires" ) )
122122 expect ( response ) . to render_template ( "decidim/forms/questionnaires/show" )
@@ -126,15 +126,15 @@ module Decidim::Meetings
126126
127127 describe "POST join_waitlist" do
128128 let ( :meeting ) { create ( :meeting , component :, available_slots : 10 ) }
129- let! ( :registrations ) { create_list ( :registration , 10 , meeting : meeting ) }
129+ let! ( :registrations ) { create_list ( :registration , 10 , meeting :) }
130130 let ( :params ) { { meeting_id : meeting . id } }
131131
132132 before { sign_in user }
133133
134134 context "when meeting has no available slots" do
135135 it "adds user to waitlist" do
136136 expect do
137- post :join_waitlist , params : params
137+ post :join_waitlist , params :
138138 end . to change ( Registration . on_waiting_list , :count ) . by ( 1 )
139139
140140 expect ( flash [ :notice ] ) . to eq ( I18n . t ( "registrations.waitlist.success" , scope : "decidim.meetings" ) )
@@ -151,7 +151,7 @@ module Decidim::Meetings
151151
152152 it "destroys registration" do
153153 expect do
154- delete :destroy , params : params
154+ delete :destroy , params :
155155 end . to change ( Registration , :count ) . by ( -1 )
156156
157157 expect ( flash [ :notice ] ) . to match ( /successfully/ )
0 commit comments