Skip to content

Commit

Permalink
Merge pull request #1540 from himdel/fix-hawk
Browse files Browse the repository at this point in the history
Fix middleware spec failures on master
  • Loading branch information
h-kataria authored Jun 14, 2017
2 parents cb8393a + db36fc9 commit 663dd74
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
6 changes: 5 additions & 1 deletion spec/controllers/middleware_server_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
describe MiddlewareServerController do
let(:server) { FactoryGirl.create(:hawkular_middleware_server, :properties => {}, :middleware_server_group => nil) }
let(:server) do
FactoryGirl.create(:hawkular_middleware_server, :properties => {},
:middleware_server_group => nil,
:feed => '')
end

render_views
before(:each) do
Expand Down
10 changes: 8 additions & 2 deletions spec/controllers/middleware_server_group_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,17 @@
end

describe '#show' do
let(:group) { FactoryGirl.create(:hawkular_middleware_server_group, :properties => {}, :middleware_domain => nil) }
let(:group) do
FactoryGirl.create(:hawkular_middleware_server_group, :properties => {},
:middleware_domain => nil)
end

let(:server) do
FactoryGirl.create(:hawkular_middleware_server, :properties => {},
:middleware_server_group => group)
:middleware_server_group => group,
:feed => '')
end

before do
EvmSpecHelper.create_guid_miq_server_zone
login_as FactoryGirl.create(:user)
Expand Down
2 changes: 1 addition & 1 deletion spec/helpers/application_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1298,7 +1298,7 @@
stub_user(:features => :all)
allow(helper).to receive_messages(:controller_name => "ems_middleware")
ems = FactoryGirl.create(:ems_hawkular)
MiddlewareDatasource.create(:ext_management_system => ems, :name => "Test Middleware")
FactoryGirl.create(:hawkular_middleware_datasource, :ext_management_system => ems, :name => "Test Middleware")
expect(helper.multiple_relationship_link(ems, "middleware_datasource")).to eq("<li><a title=\"Show Middleware \
Datasources\" href=\"/ems_middleware/#{ems.id}?display=middleware_datasources\">Middleware Datasources (1)</a></li>")
end
Expand Down

0 comments on commit 663dd74

Please sign in to comment.