Sha256: 08255e87f6d72fa7c813db24819f27d2b35f365966a16a6e17dedb8c36328c0a

Contents?: true

Size: 1.36 KB

Versions: 18

Compression:

Stored size: 1.36 KB

Contents

require 'test_plugin_helper'

module Api
  module V2
    class RemoteExecutionFeaturesControllerTest < ActionController::TestCase
      setup do
        @remote_execution_feature = RemoteExecutionFeature.register(:my_awesome_feature, 'My awesome feature',
                                                                    :description => 'You will not believe what it does',
                                                                    :provided_inputs => ['awesomeness_level'])
        @template = FactoryGirl.create(:job_template, :with_input)
      end

      test 'should get index' do
        get :index
        remote_execution_features = ActiveSupport::JSON.decode(@response.body)
        refute remote_execution_features.empty?, 'Should respond with input sets'
        assert_response :success
      end

      test 'should get input set detail' do
        get :show, :id => @remote_execution_feature.to_param
        assert_response :success
        remote_execution_feature = ActiveSupport::JSON.decode(@response.body)
        refute remote_execution_feature.empty?
        assert_equal remote_execution_feature['name'], @remote_execution_feature.name
      end

      test 'should update valid' do
        put :update, :id => @remote_execution_feature.to_param,
                     :job_template_id => @template.id
        assert_response :ok
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
foreman_remote_execution-1.3.7 test/functional/api/v2/remote_execution_features_controller_test.rb
foreman_remote_execution-1.3.6 test/functional/api/v2/remote_execution_features_controller_test.rb
foreman_remote_execution-1.4.1 test/functional/api/v2/remote_execution_features_controller_test.rb
foreman_remote_execution-1.3.5 test/functional/api/v2/remote_execution_features_controller_test.rb
foreman_remote_execution-1.3.4 test/functional/api/v2/remote_execution_features_controller_test.rb
foreman_remote_execution-1.3.3 test/functional/api/v2/remote_execution_features_controller_test.rb
foreman_remote_execution-1.3.2 test/functional/api/v2/remote_execution_features_controller_test.rb
foreman_remote_execution-1.3.1 test/functional/api/v2/remote_execution_features_controller_test.rb
foreman_remote_execution-1.3.0 test/functional/api/v2/remote_execution_features_controller_test.rb
foreman_remote_execution-1.2.2 test/functional/api/v2/remote_execution_features_controller_test.rb
foreman_remote_execution-1.2.1 test/functional/api/v2/remote_execution_features_controller_test.rb
foreman_remote_execution-1.2.0 test/functional/api/v2/remote_execution_features_controller_test.rb
foreman_remote_execution-1.1.1 test/functional/api/v2/remote_execution_features_controller_test.rb
foreman_remote_execution-1.1.0 test/functional/api/v2/remote_execution_features_controller_test.rb
foreman_remote_execution-1.0.0 test/functional/api/v2/remote_execution_features_controller_test.rb
foreman_remote_execution-0.3.2 test/functional/api/v2/remote_execution_features_controller_test.rb
foreman_remote_execution-0.3.1 test/functional/api/v2/remote_execution_features_controller_test.rb
foreman_remote_execution-0.3.0 test/functional/api/v2/remote_execution_features_controller_test.rb