Sha256: 059071ea1e1b543abac6f4e9126a2b4f38d435d5b6b977e9122822f3bd614a2f

Contents?: true

Size: 1.43 KB

Versions: 86

Compression:

Stored size: 1.43 KB

Contents

require "spec_helper"

describe Brief::Server::Route do
  it "routes to the browse handler" do
    expect(handler_for("/browse/epics")).to eq(Brief::Server::Handlers::Browse)
  end

  it "routes to the create handler" do
    expect(handler_for("/create/epics/new.html.md")).to eq(Brief::Server::Handlers::Modify)
  end

  it "routes to the update handler" do
    expect(handler_for("/update/epics/new.html.md")).to eq(Brief::Server::Handlers::Modify)
  end

  it "routes to the remove handler" do
    expect(handler_for("/remove/epics/new.html.md")).to eq(Brief::Server::Handlers::Modify)
  end

  it "routes to the actions handler" do
    expect(handler_for("/actions/custom_action/epics/epic.html.md")).to eq(Brief::Server::Handlers::Action)
  end

  it "routes to the schema browse handler" do
    expect(handler_for("/schema")).to eq(Brief::Server::Handlers::Schema)
  end

  it "routes to the schema details handler" do
    expect(handler_for("/schema/epic")).to eq(Brief::Server::Handlers::Schema)
  end

  it "routes to the view content handler" do
    expect(handler_for("/view/content/epics/epic.html.md")).to eq(Brief::Server::Handlers::Show)
  end

  it "routes to the view rendered handler" do
    expect(handler_for("/view/rendered/epics/epic.html.md")).to eq(Brief::Server::Handlers::Show)
  end

  it "routes to the view details handler" do
    expect(handler_for("/view/details/epics/epic.html.md")).to eq(Brief::Server::Handlers::Show)
  end
end

Version data entries

86 entries across 86 versions & 1 rubygems

Version Path
brief-1.17.14 spec/lib/brief/server/route_spec.rb
brief-1.17.13 spec/lib/brief/server/route_spec.rb
brief-1.17.12 spec/lib/brief/server/route_spec.rb
brief-1.17.11 spec/lib/brief/server/route_spec.rb
brief-1.17.10 spec/lib/brief/server/route_spec.rb
brief-1.17.9 spec/lib/brief/server/route_spec.rb
brief-1.17.8 spec/lib/brief/server/route_spec.rb
brief-1.17.7 spec/lib/brief/server/route_spec.rb
brief-1.17.5 spec/lib/brief/server/route_spec.rb
brief-1.17.4 spec/lib/brief/server/route_spec.rb
brief-1.17.3 spec/lib/brief/server/route_spec.rb
brief-1.17.2 spec/lib/brief/server/route_spec.rb
brief-1.17.1 spec/lib/brief/server/route_spec.rb
brief-1.17.0 spec/lib/brief/server/route_spec.rb
brief-1.16.2 spec/lib/brief/server/route_spec.rb
brief-1.16.1 spec/lib/brief/server/route_spec.rb
brief-1.16.0 spec/lib/brief/server/route_spec.rb
brief-1.15.5 spec/lib/brief/server/route_spec.rb
brief-1.15.4 spec/lib/brief/server/route_spec.rb
brief-1.15.3 spec/lib/brief/server/route_spec.rb