0
0
Fork 0

Fix /api/v1/accounts/update_credentials tests (#1357)

This commit is contained in:
Eugen 2017-04-09 20:23:14 +02:00 committed by GitHub
parent 43f955e31f
commit 15d442cf9d
3 changed files with 35 additions and 29 deletions

View file

@ -5,6 +5,7 @@ RSpec.describe Auth::RegistrationsController, type: :controller do
describe 'GET #new' do
before do
Setting.open_registrations = true
request.env["devise.mapping"] = Devise.mappings[:user]
end
@ -16,6 +17,7 @@ RSpec.describe Auth::RegistrationsController, type: :controller do
describe 'POST #create' do
before do
Setting.open_registrations = true
request.env["devise.mapping"] = Devise.mappings[:user]
post :create, params: { user: { account_attributes: { username: 'test' }, email: 'test@example.com', password: '12345678', password_confirmation: '12345678' } }
end