Sha256: 8bff6f8f729b9e3216c69873e5f700f48e8c6473ad2bb5452f9f46c4acb2dd32

Contents?: true

Size: 564 Bytes

Versions: 15

Compression:

Stored size: 564 Bytes

Contents

require 'spec_helper'

describe MB::API::V1::JobsEndpoint do
  include Rack::Test::Methods

  before(:all) { MB::RestGateway.start(port: 26101) }
  after(:all) { MB::RestGateway.stop }
  let(:app) { MB::RestGateway.instance.app }

  describe "GET /jobs" do
    it "returns all jobs" do
      get '/jobs'
      last_response.status.should == 200
      JSON.parse(last_response.body).should have(0).items
    end
  end

  describe "GET /jobs/:id" do
    it "returns 404 if missing" do
      get '/jobs/456'
      last_response.status.should == 404
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
motherbrain-1.5.0 spec/unit/mb/api/v1/jobs_endpoint_spec.rb
motherbrain-1.4.0 spec/unit/mb/api/v1/jobs_endpoint_spec.rb
motherbrain-1.3.0 spec/unit/mb/api/v1/jobs_endpoint_spec.rb
motherbrain-1.2.1 spec/unit/mb/api/v1/jobs_endpoint_spec.rb
motherbrain-1.2.0 spec/unit/mb/api/v1/jobs_endpoint_spec.rb
motherbrain-1.1.3 spec/unit/mb/api/v1/jobs_endpoint_spec.rb
motherbrain-1.1.2 spec/unit/mb/api/v1/jobs_endpoint_spec.rb
motherbrain-1.1.1 spec/unit/mb/api/v1/jobs_endpoint_spec.rb
motherbrain-1.1.0 spec/unit/mb/api/v1/jobs_endpoint_spec.rb
motherbrain-1.0.0 spec/unit/mb/api/v1/jobs_endpoint_spec.rb
motherbrain-0.14.5 spec/unit/mb/api/v1/jobs_endpoint_spec.rb
motherbrain-0.14.4 spec/unit/mb/api/v1/jobs_endpoint_spec.rb
motherbrain-0.14.3 spec/unit/mb/api/v1/jobs_endpoint_spec.rb
motherbrain-0.14.2 spec/unit/mb/api/v1/jobs_endpoint_spec.rb
motherbrain-0.13.1 spec/unit/mb/api/v1/jobs_endpoint_spec.rb