Sha256: 06a03159da3612f14e7ecd41eb292b4bbf596a11777aabbeac3576bf219b3468

Contents?: true

Size: 1.06 KB

Versions: 78

Compression:

Stored size: 1.06 KB

Contents

require "spec_helper"

describe "Viewing a Briefcase Document", :type => :request do

  it "does not show the document content if it is invalid" do
    get("/view/content/../../../../spec_helper.rb")
    expect(last_response.status).to eq(403)
  end

  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

78 entries across 78 versions & 1 rubygems

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