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.15.2 spec/lib/brief/attachments_spec.rb
brief-1.15.1 spec/lib/brief/attachments_spec.rb
brief-1.15.0 spec/lib/brief/attachments_spec.rb
brief-1.14.3 spec/lib/brief/attachments_spec.rb
brief-1.14.2 spec/lib/brief/attachments_spec.rb
brief-1.14.1 spec/lib/brief/attachments_spec.rb
brief-1.14.0 spec/lib/brief/attachments_spec.rb
brief-1.13.2 spec/lib/brief/attachments_spec.rb
brief-1.13.1 spec/lib/brief/attachments_spec.rb
brief-1.12.9 spec/lib/brief/attachments_spec.rb
brief-1.12.8 spec/lib/brief/attachments_spec.rb
brief-1.12.7 spec/lib/brief/attachments_spec.rb
brief-1.12.6 spec/lib/brief/attachments_spec.rb
brief-1.12.5 spec/lib/brief/attachments_spec.rb
brief-1.12.4 spec/lib/brief/attachments_spec.rb
brief-1.12.3 spec/lib/brief/attachments_spec.rb
brief-1.12.2 spec/lib/brief/attachments_spec.rb
brief-1.12.1 spec/lib/brief/attachments_spec.rb
brief-1.12.0 spec/lib/brief/attachments_spec.rb
brief-1.11.10 spec/lib/brief/attachments_spec.rb