Merge branch '35643-impersonate-spec' into '9-4-stable-patch-2'

Resolve "Impersonation Tokens creation spec failure in admin_users_impersonation_tokens_spec.rb"

See merge request !13145
This commit is contained in:
Rémy Coutable 2017-07-28 10:07:46 +00:00 committed by Simon Knox
parent da967803cc
commit d783dcd0f2

View file

@ -32,11 +32,13 @@ describe 'Admin > Users > Impersonation Tokens', js: true do
check "api" check "api"
check "read_user" check "read_user"
expect { click_on "Create impersonation token" }.to change { PersonalAccessTokensFinder.new(impersonation: true).execute.count } click_on "Create impersonation token"
expect(active_impersonation_tokens).to have_text(name) expect(active_impersonation_tokens).to have_text(name)
expect(active_impersonation_tokens).to have_text('In') expect(active_impersonation_tokens).to have_text('In')
expect(active_impersonation_tokens).to have_text('api') expect(active_impersonation_tokens).to have_text('api')
expect(active_impersonation_tokens).to have_text('read_user') expect(active_impersonation_tokens).to have_text('read_user')
expect(PersonalAccessTokensFinder.new(impersonation: true).execute.count).to equal(1)
end end
end end