Sha256: 32160c90900887f3cc8235cf0c48c1541b57534c0cd5d8a6ddf3719c258b4459

Contents?: true

Size: 543 Bytes

Versions: 86

Compression:

Stored size: 543 Bytes

Contents

require "brief/server/gateway"
require "spec_helper"

describe "Briefcase Server Gateway" do
  let(:gateway) do
    Brief::Server::Gateway.new(root: Brief.spec_root.join("fixtures"))
  end

  it "routes requests to briefcase projects inside a folder" do
    response = gateway.call(env_for("/briefcases/example/browse/epics"))
    status, headers, body = response
    json = JSON.parse(response.last.first)

    expect(status).to eq(200)
    expect(headers["Access-Control-Allow-Origin"]).to eq("*")
    expect(json.length).to eq(1)
  end
end

Version data entries

86 entries across 86 versions & 1 rubygems

Version Path
brief-1.9.4 spec/lib/brief/server/gateway_spec.rb
brief-1.9.3 spec/lib/brief/server/gateway_spec.rb
brief-1.9.2 spec/lib/brief/server/gateway_spec.rb
brief-1.9.1 spec/lib/brief/server/gateway_spec.rb
brief-1.9.0 spec/lib/brief/server/gateway_spec.rb
brief-1.8.12 spec/lib/brief/server/gateway_spec.rb
brief-1.8.11 spec/lib/brief/server/gateway_spec.rb
brief-1.8.10 spec/lib/brief/server/gateway_spec.rb
brief-1.8.9 spec/lib/brief/server/gateway_spec.rb
brief-1.8.8 spec/lib/brief/server/gateway_spec.rb
brief-1.8.6 spec/lib/brief/server/gateway_spec.rb
brief-1.8.5 spec/lib/brief/server/gateway_spec.rb
brief-1.8.4 spec/lib/brief/server/gateway_spec.rb
brief-1.8.3 spec/lib/brief/server/gateway_spec.rb
brief-1.8.2 spec/lib/brief/server/gateway_spec.rb
brief-1.8.1 spec/lib/brief/server/gateway_spec.rb
brief-1.8.0 spec/lib/brief/server/gateway_spec.rb
brief-1.7.3 spec/lib/brief/server/gateway_spec.rb
brief-1.7.2 spec/lib/brief/server/gateway_spec.rb
brief-1.7.1 spec/lib/brief/server/gateway_spec.rb