Sha256: f06f582c868b70aafcf235e05e2e5ffc999662bab1b460c22fbb5a39d8cb5835
Contents?: true
Size: 949 Bytes
Versions: 2
Compression:
Stored size: 949 Bytes
Contents
require 'test_helper' module KatelloForemanEngine module Actions class EnvCreateTest < ActiveSupport::TestCase test "doesn't run for library" do org = Organization.new(:label => 'org') env = KTEnvironment.new(:label => 'dev') env.organization = org env.library = false step = run_steps(EnvironmentCreate, {}, env).first assert_equal EnvironmentCreate, step.action_class assert_equal 'org', step.input['org_label'] assert_equal 'dev', step.input['label'] assert_equal 'env', step.input['content_view_id'] env.library = true assert_equal [], run_steps(EnvironmentCreate, {}, env) end test 'calls bindings to create environment' do Bindings.expects(:environment_create).with('env', 'org', 'dev') EnvironmentCreate.new('org_label' => 'org', 'label' => 'dev', 'content_view_id' => 'env').run end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
katello-foreman-engine-0.0.3 | test/lib/actions/env_create_test.rb |
katello-foreman-engine-0.0.2 | test/lib/actions/env_create_test.rb |