Sha256: 5ddbde67f87255c38bbf95cf4a35657fc5cd339803b7c43641859adae0e52555

Contents?: true

Size: 916 Bytes

Versions: 8

Compression:

Stored size: 916 Bytes

Contents

require "spec_helper"

describe "Viewing a Briefcase Document", :type => :request do
  it "shows the document content" do
    get("/view/content/epics/epic.html.md")
    expect(last_response.status).to eq(200)
  end

  it "shows the rendered version of the document" do
    get("/view/rendered/epics/epic.html.md")
    expect(last_response.status).to eq(200)
  end

  it "shows the rendered version of the document json" do
    get("/view/details/epics/epic.html.md")
    expect(last_response.status).to eq(200)
  end

  it "includes raw content in details mode if asked" do
    get("/view/details/epics/epic.html.md?content=true&rendered=true")
    expect(json["rendered"]).not_to be_empty
    expect(json["content"]).not_to be_empty
  end

  it "includes rendered content in details mode if asked" do
    get("/view/details/epics/epic.html.md?rendered=true")
    expect(json["rendered"]).not_to be_empty
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
brief-1.7.2 spec/acceptance/showing_spec.rb
brief-1.7.1 spec/acceptance/showing_spec.rb
brief-1.7.0 spec/acceptance/showing_spec.rb
brief-1.6.1 spec/acceptance/showing_spec.rb
brief-1.6.0 spec/acceptance/showing_spec.rb
brief-1.5.2 spec/acceptance/showing_spec.rb
brief-1.5.1 spec/acceptance/showing_spec.rb
brief-1.5.0 spec/acceptance/showing_spec.rb