Skip to content

Commit

Permalink
s/run_options/options/
Browse files Browse the repository at this point in the history
  • Loading branch information
imtayadeway committed Sep 13, 2017
1 parent 248511c commit bb5e606
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion spec/requests/authentications_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@

describe 'OPTIONS /api/authentications' do
it 'returns expected and additional attributes' do
run_options(api_authentications_url)
options(api_authentications_url)

additional_options = {
'credential_types' => build_credential_options
Expand Down
2 changes: 1 addition & 1 deletion spec/requests/clusters_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
it 'returns clusters node_types' do
expected_data = {"node_types" => EmsCluster.node_types.to_s}

run_options(api_clusters_url)
options(api_clusters_url)
expect_options_results(:clusters, expected_data)
end
end
Expand Down
4 changes: 2 additions & 2 deletions spec/requests/container_deployments_spec.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
describe "Container Deployments API" do
it "supports OPTIONS requests without authorization" do
run_options api_container_deployments_url
options api_container_deployments_url
expect(response).to have_http_status(:ok)
expect(response.parsed_body["data"]).to be_empty
end

it "supports collect-data with OPTIONS" do
allow_any_instance_of(ContainerDeploymentService).to receive(:cloud_init_template_id).and_return(1)
api_basic_authorize
run_options api_container_deployments_url
options api_container_deployments_url
expect(response).to have_http_status(:ok)
expect_hash_to_have_only_keys(response.parsed_body["data"], %w(deployment_types providers provision))
end
Expand Down
2 changes: 1 addition & 1 deletion spec/requests/generic_object_definitions_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@

describe 'OPTIONS /api/generic_object_definitions' do
it 'returns allowed association types and data types' do
run_options(api_generic_object_definitions_url)
options(api_generic_object_definitions_url)

expected_data = {'allowed_association_types' => Api::GenericObjectDefinitionsController.allowed_association_types,
'allowed_types' => Api::GenericObjectDefinitionsController.allowed_types}
Expand Down
2 changes: 1 addition & 1 deletion spec/requests/hosts_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
it 'returns hosts node_types' do
expected_data = {"node_types" => Host.node_types.to_s}

run_options(api_hosts_url)
options(api_hosts_url)
expect_options_results(:hosts, expected_data)
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/requests/providers_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,7 @@ def gen_import_request

context "OPTIONS /api/providers" do
it "returns options for all providers when no query" do
run_options(api_providers_url)
options(api_providers_url)
expect(response.parsed_body["data"]["provider_settings"].keys.count).to eq(
ManageIQ::Providers::BaseManager.leaf_subclasses.count
)
Expand Down
2 changes: 1 addition & 1 deletion spec/requests/querying_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ def create_vms_by_name(names)

describe 'OPTIONS /api/vms' do
it 'returns the options information' do
run_options(api_vms_url)
options(api_vms_url)
expect_options_results(:vms)
end
end
Expand Down
4 changes: 0 additions & 4 deletions spec/support/api_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
module Spec
module Support
module ApiHelper
def run_options(url, headers = {})
options url, headers
end

def resources_include_suffix?(resources, key, suffix)
resources.any? { |r| r.key?(key) && r[key].match("#{suffix}$") }
end
Expand Down

0 comments on commit bb5e606

Please sign in to comment.