Skip to content

Commit

Permalink
Merge pull request #991 from PanSpagetka/add-specs-group-add
Browse files Browse the repository at this point in the history
Add specs for RBAC group add
  • Loading branch information
martinpovolny committed Apr 11, 2017
2 parents 9faeb01 + 44543be commit 2d83304
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions spec/controllers/ops_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,25 @@
get :x_button, :params => { :pressed => 'random_dude', :format => :html }
expect(response).to render_template('layouts/exception')
end

describe 'x_button actions' do
it 'rbac group add' do
post :x_button, :params => {:pressed => 'rbac_group_add'}
expect(response.status).to eq(200)
end

it 'rbac group edit' do
post :x_button, :params => {:pressed => 'rbac_group_edit', :id => MiqGroup.first.id}
expect(response.status).to eq(200)
end

it 'rbac role add' do
MiqProductFeature.seed
allow(MiqProductFeature).to receive(:feature_root).and_return('everything')
post :x_button, :params => {:pressed => 'rbac_role_add'}
expect(response.status).to eq(200)
end
end
end

it 'can view the db_settings tab' do
Expand Down

0 comments on commit 2d83304

Please sign in to comment.