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