Sha256: 9c7849f15218b726ae34db00b9293ccfc025aa196c7a8a921e08c31422d95c22
Contents?: true
Size: 753 Bytes
Versions: 1
Compression:
Stored size: 753 Bytes
Contents
require 'rails_helper' module Attorney describe DocumentsHelper do describe '#published_badge' do context "when it's published" do let(:document) { Document.create!(slug: 'terms-and-conditions', published: true) } it { expect(helper.published_badge(document)).to include 'badge badge-success' } it { expect(helper.published_badge(document)).to include 'Published' } end context "when it's not published" do let(:document) { Document.create!(slug: 'terms-and-conditions', published: false) } it { expect(helper.published_badge(document)).to include 'badge badge-secondary' } it { expect(helper.published_badge(document)).to include 'Not published' } end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
attorney-1.0.0 | spec/helpers/documents_helper_spec.rb |