Sha256: 6004dc7e44e34f6a0c0e4699811c416604d88e9cee6727666a4067223c238b8c

Contents?: true

Size: 657 Bytes

Versions: 8

Compression:

Stored size: 657 Bytes

Contents

require "foreman_tasks_test_helper"

module ForemanTasks
  class Api::TasksControllerTest < ActionController::TestCase
    describe 'tasks api controller' do
      tests ForemanTasks::Api::TasksController

      before do
        User.current = User.where(:login => 'apiadmin').first
        @request.env['HTTP_ACCEPT'] = 'application/json'
        @request.env['CONTENT_TYPE'] = 'application/json'
        @task = FactoryGirl.create(:dynflow_task, :user_create_task)
      end

      it 'searches for task on GET' do
        get(:show, :id => @task.id)
        assert_response :success
        assert_template 'api/tasks/show'
      end

    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
foreman-tasks-0.7.2 test/controllers/api/tasks_controller_test.rb
foreman-tasks-0.7.1 test/controllers/api/tasks_controller_test.rb
foreman-tasks-0.7.0 test/controllers/api/tasks_controller_test.rb
foreman-tasks-0.6.15 test/controllers/api/tasks_controller_test.rb
foreman-tasks-0.6.14 test/controllers/api/tasks_controller_test.rb
foreman-tasks-0.6.13 test/controllers/api/tasks_controller_test.rb
foreman-tasks-0.6.12 test/controllers/api/tasks_controller_test.rb
foreman-tasks-0.6.11 test/controllers/api/tasks_controller_test.rb