Sha256: 6d29552abaf2d9d2d0cf8edf059a2bb6be46777b5f9335cecc2d51e148be35eb

Contents?: true

Size: 542 Bytes

Versions: 58

Compression:

Stored size: 542 Bytes

Contents

require "spec_helper"

describe "Rendering Attachments" do
  let(:release) { Brief.testcase.releases.first }
  let(:doc) { release.document }

  it "detects attachments" do
    expect(doc).to be_has_attachments
  end

  it "makes attachments content available" do
    expect(doc.render_attachments).not_to be_empty
  end

  it "optionally makes attachments available in the model serializer" do
    expect(release.as_json()).not_to have_key(:attachments)
    expect(release.as_json(attachments: true)[:attachments]).not_to be_empty
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

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