Skip to content

Commit

Permalink
Render flash when running compliance check for a container node 🐞
Browse files Browse the repository at this point in the history
  • Loading branch information
skateman committed Nov 27, 2017
1 parent 00c69cc commit 9a7a01f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/mixins/containers_common_mixin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ def process_check_compliance(model, ids)
add_flash(_("\"%{record}\": Compliance check successfully initiated") % {:record => entity.name})
end
end
javascript_flash
end

included do
Expand Down
16 changes: 16 additions & 0 deletions spec/controllers/container_node_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,22 @@
end
end

describe "#button" do
let(:node) { FactoryGirl.create(:container_node) }

context "container_node_check_compliance" do
before do
EvmSpecHelper.create_guid_miq_server_zone
login_as FactoryGirl.create(:user)
end

it 'displays a flash message' do
post :button, :pressed => 'container_node_check_compliance', :id => node.id
expect(JSON.parse(response.body)['replacePartials']).to have_key('flash_msg_div')
end
end
end

it "renders show_list" do
session[:settings] = {:default_search => 'foo',
:views => {:containernode => 'list'},
Expand Down

0 comments on commit 9a7a01f

Please sign in to comment.