Skip to content

Commit

Permalink
Add spec to check if 'Choose a Role' is disabled if present in drop down
Browse files Browse the repository at this point in the history
  • Loading branch information
Hilda Stastna committed Aug 5, 2019
1 parent 18b7b62 commit 5025fcc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spec/views/ops/_rbac_group_details.html.haml_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,14 @@
expect(rendered).not_to have_selector('input#lookup')
expect(rendered).not_to include('Look up External Authentication Groups')
end

context 'choosing Role from the drop down while adding Group' do
before { view.instance_variable_set(:@edit, :ldap_groups_by_user => [], :new => {}, :roles => {'<Choose a Role>' => nil}, :projects_tenants => []) }

it 'disables Choose a Role option' do
render :partial => 'ops/rbac_group_details'
expect(rendered).to include('<option selected="selected" disabled="disabled" value="">&lt;Choose a Role&gt;</option>')
end
end
end
end

0 comments on commit 5025fcc

Please sign in to comment.