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.17.14 spec/lib/brief/server/gateway_spec.rb
brief-1.17.13 spec/lib/brief/server/gateway_spec.rb
brief-1.17.12 spec/lib/brief/server/gateway_spec.rb
brief-1.17.11 spec/lib/brief/server/gateway_spec.rb
brief-1.17.10 spec/lib/brief/server/gateway_spec.rb
brief-1.17.9 spec/lib/brief/server/gateway_spec.rb
brief-1.17.8 spec/lib/brief/server/gateway_spec.rb
brief-1.17.7 spec/lib/brief/server/gateway_spec.rb
brief-1.17.5 spec/lib/brief/server/gateway_spec.rb
brief-1.17.4 spec/lib/brief/server/gateway_spec.rb
brief-1.17.3 spec/lib/brief/server/gateway_spec.rb
brief-1.17.2 spec/lib/brief/server/gateway_spec.rb
brief-1.17.1 spec/lib/brief/server/gateway_spec.rb
brief-1.17.0 spec/lib/brief/server/gateway_spec.rb
brief-1.16.2 spec/lib/brief/server/gateway_spec.rb
brief-1.16.1 spec/lib/brief/server/gateway_spec.rb
brief-1.16.0 spec/lib/brief/server/gateway_spec.rb
brief-1.15.5 spec/lib/brief/server/gateway_spec.rb
brief-1.15.4 spec/lib/brief/server/gateway_spec.rb
brief-1.15.3 spec/lib/brief/server/gateway_spec.rb