Improve registrar area linked user switch

- Introduce profile
- Move linked users to profile
- Use PUT

#599
This commit is contained in:
Artur Beljajev 2017-10-09 11:03:43 +03:00
parent bd78c9d5c8
commit e2ebe0aa84
16 changed files with 248 additions and 73 deletions

View file

@ -0,0 +1,16 @@
require 'rails_helper'
RSpec.describe UserPresenter do
let(:presenter) { described_class.new(user: user, view: view) }
describe '#login_with_role' do
let(:user) { instance_double(ApiUser,
login: 'login',
roles: %w[role],
registrar_name: 'registrar') }
it 'returns username with role and registrar' do
expect(presenter.login_with_role).to eq('login (role) - registrar')
end
end
end