FIX: Can't edit membership request template on group page.

This commit is contained in:
Guo Xiang Tan 2017-11-02 08:51:43 +08:00
parent 44eeb20c50
commit ab2a5cef38
2 changed files with 7 additions and 4 deletions

View File

@ -365,7 +365,8 @@ class GroupsController < ApplicationController
:full_name, :full_name,
:public_admission, :public_admission,
:public_exit, :public_exit,
:allow_membership_requests :allow_membership_requests,
:membership_request_template,
) )
end end

View File

@ -112,10 +112,11 @@ describe GroupsController do
full_name: 'awesome team', full_name: 'awesome team',
public_admission: true, public_admission: true,
public_exit: true, public_exit: true,
allow_membership_requests: true allow_membership_requests: true,
membership_request_template: 'testing',
} }
} }
end.to change { GroupHistory.count }.by(8) end.to change { GroupHistory.count }.by(9)
expect(response).to be_success expect(response).to be_success
@ -129,7 +130,8 @@ describe GroupsController do
expect(group.public_admission).to eq(true) expect(group.public_admission).to eq(true)
expect(group.public_exit).to eq(true) expect(group.public_exit).to eq(true)
expect(group.allow_membership_requests).to eq(true) expect(group.allow_membership_requests).to eq(true)
expect(GroupHistory.last.subject).to eq('allow_membership_requests') expect(group.membership_request_template).to eq('testing')
expect(GroupHistory.last.subject).to eq('membership_request_template')
end end
end end