invite: add button for invite someone to collaborate on a draft
This commit is contained in:
parent
9541e781bb
commit
1cac0b80af
10 changed files with 239 additions and 6 deletions
|
@ -69,11 +69,16 @@ describe InvitesController, type: :controller do
|
|||
|
||||
context 'when user has access to dossier' do
|
||||
before do
|
||||
request.env["HTTP_REFERER"] = "/dossiers/#{dossier.id}/modifier"
|
||||
dossier.update(user: signed_in_profile)
|
||||
end
|
||||
|
||||
it { expect { subject }.to change(InviteUser, :count).by(1) }
|
||||
|
||||
it "redirects to the previous URL" do
|
||||
expect(subject).to redirect_to("/dossiers/#{dossier.id}/modifier")
|
||||
end
|
||||
|
||||
context 'when email is assign to an user' do
|
||||
let! (:user_invite) { create(:user, email: email) }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue