blob: c223d6702c5a603f98cdc1d9c5a7a15d5c9b7237 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'profiles/keys/_key_details.html.haml' do
let_it_be(:user) { create(:user) }
before do
assign(:key, key)
allow(view).to receive(:is_admin).and_return(false)
end
describe 'displays the usage type' do
where(:usage_type, :usage_type_text) do
[
[:auth, 'Authentication'],
[:auth_and_signing, 'Authentication & Signing'],
[:signing, 'Signing']
]
end
with_them do
let(:key) { create(:key, user: user, usage_type: usage_type) }
it 'renders usage type text' do
render
expect(rendered).to have_text(usage_type_text)
end
end
end
end
|