Skip to content

Commit

Permalink
Specs for automation manager gtl toolbar when refreshed from hash
Browse files Browse the repository at this point in the history
  • Loading branch information
lgalis committed May 24, 2017
1 parent ef57ada commit a43ceff
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions spec/helpers/application_helper/toolbar_chooser_spec.rb
Expand Up @@ -153,4 +153,24 @@
it { is_expected.to be_falsey }
end
end

describe '#x_view_toolbar_filename' do
before do
@record = FactoryGirl.create(:inventory_root_group)
end

context 'when the active tab is summary' do
it "displays summary toolbar" do
@sb = {:active_tab => 'summary'}
expect(ApplicationHelper::ToolbarChooser.new(nil, nil, :record => @record, :explorer => true, :layout => 'automation_manager', :sb => @sb).send(:x_view_toolbar_filename)).to eq("x_summary_view_tb")
end
end

context ' when the active tab is configured_systems' do
it "displays summary toolbar" do
@sb = {:active_tab => 'configured_systems'}
expect(ApplicationHelper::ToolbarChooser.new(nil, nil, :record => @record, :explorer => true, :layout => 'automation_manager', :sb => @sb).send(:x_view_toolbar_filename)).to eq("x_gtl_view_tb")
end
end
end
end

0 comments on commit a43ceff

Please sign in to comment.