diff --git a/app/views/groups/_memberships.html.erb b/app/views/groups/_memberships.html.erb index a7d554fff612..8426d22ee27b 100644 --- a/app/views/groups/_memberships.html.erb +++ b/app/views/groups/_memberships.html.erb @@ -26,7 +26,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See COPYRIGHT and LICENSE files for more details. ++#%> -<% roles = Role.givable %> +<% roles = ProjectRole.givable %> <% projects = Project.active.order(Arel.sql('lft')) %> <% memberships = @group.memberships %> diff --git a/modules/meeting/spec/requests/recurring_meetings/recurring_meetings_template_completed_spec.rb b/modules/meeting/spec/requests/recurring_meetings/recurring_meetings_template_completed_spec.rb index f2beccd77791..d7b49ad02e5a 100644 --- a/modules/meeting/spec/requests/recurring_meetings/recurring_meetings_template_completed_spec.rb +++ b/modules/meeting/spec/requests/recurring_meetings/recurring_meetings_template_completed_spec.rb @@ -51,13 +51,17 @@ post template_completed_recurring_meeting_path(recurring_meeting) end + subject do + Timecop.freeze("2024-12-04T10:00:00Z".to_datetime) { request } + end + before do login_as(current_user) end context "when first occurrence is not existing" do it "instantiates the first occurrence from template" do - expect { request }.to change(recurring_meeting.scheduled_meetings, :count).by(1) + expect { subject }.to change(recurring_meeting.scheduled_meetings, :count).by(1) expect(response).to be_redirect expect(recurring_meeting.scheduled_meetings.count).to eq(1) @@ -81,7 +85,7 @@ end it "does not create a new meeting" do - expect { request }.not_to change(recurring_meeting.scheduled_meetings, :count) + expect { subject }.not_to change(recurring_meeting.scheduled_meetings, :count) expect(response).to be_redirect expect(recurring_meeting.scheduled_meetings.count).to eq(1) @@ -99,7 +103,7 @@ end it "takes over that occurrence" do - expect { request }.to change(recurring_meeting.meetings, :count).by(1) + expect { subject }.to change(recurring_meeting.meetings, :count).by(1) expect(response).to be_redirect expect(recurring_meeting.scheduled_meetings.count).to eq(1) @@ -113,7 +117,7 @@ let(:current_user) { create(:user) } it "does not authorize" do - request + subject expect(response).to have_http_status(:not_found) end end