Created
December 25, 2016 10:06
-
-
Save moolitayer/f7d01fe24117ea7273ace29ef5640f7b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# TODO: This test can be used after https://github.com/ManageIQ/manageiq/pull/13233 merges | |
context "alerts subcollection" do | |
let(:infra_provider) { FactoryGirl.create(:ems_infra) } | |
let(:vm) { FactoryGirl.create(:vm) } | |
before(:each) { | |
api_basic_authorize collection_action_identifier(:providers, :read, :get) | |
} | |
it "get all alertss for a provider" do | |
alert_status2 | |
alert_status | |
infra_provider | |
infra_provider.vms << vm | |
vm.miq_alert_statuses << alert_status2 | |
run_get("#{providers_url}?expand=resources,alerts") | |
expect(response).to have_http_status(:ok) | |
expect(response.parsed_body["resources"].first["alerts"]["id"]).to eq(alert_status2.id) | |
expect(alert_status2.id).to_not be_nil | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment