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.11.9 spec/lib/brief/server/route_spec.rb
brief-1.11.8 spec/lib/brief/server/route_spec.rb
brief-1.11.7 spec/lib/brief/server/route_spec.rb
brief-1.11.6 spec/lib/brief/server/route_spec.rb
brief-1.11.5 spec/lib/brief/server/route_spec.rb
brief-1.11.4 spec/lib/brief/server/route_spec.rb
brief-1.11.3 spec/lib/brief/server/route_spec.rb
brief-1.11.2 spec/lib/brief/server/route_spec.rb
brief-1.11.1 spec/lib/brief/server/route_spec.rb
brief-1.11.0 spec/lib/brief/server/route_spec.rb
brief-1.10.1 spec/lib/brief/server/route_spec.rb
brief-1.10.0 spec/lib/brief/server/route_spec.rb
brief-1.9.14 spec/lib/brief/server/route_spec.rb
brief-1.9.13 spec/lib/brief/server/route_spec.rb
brief-1.9.12 spec/lib/brief/server/route_spec.rb
brief-1.9.11 spec/lib/brief/server/route_spec.rb
brief-1.9.9 spec/lib/brief/server/route_spec.rb
brief-1.9.8 spec/lib/brief/server/route_spec.rb
brief-1.9.7 spec/lib/brief/server/route_spec.rb
brief-1.9.6 spec/lib/brief/server/route_spec.rb