Sha256: a83df626e5c6c6273d04267527c1e44dab2c7aa5cea47d85a68874b18e2ec578

Contents?: true

Size: 719 Bytes

Versions: 12

Compression:

Stored size: 719 Bytes

Contents

require 'spec_helper'

describe 'curation_concerns/base/unauthorized.html.erb' do
  context "when it responds to curation_concern" do
    let(:concern) { double(human_readable_type: 'Book', id: '777') }
    before do
      allow(view).to receive(:curation_concern).and_return(concern)
      render
    end
    it "shows a message to the user" do
      expect(rendered).to have_content "Unauthorized The book you have tried to access is private ID: 777"
    end
  end

  context "when it doesn't respond to curation_concern" do
    before do
      render
    end
    it "shows a message to the user" do
      expect(rendered).to have_content "Unauthorized The page you have tried to access is private"
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
curation_concerns-0.13.0 spec/views/curation_concerns/base/unauthorized.html.erb_spec.rb
curation_concerns-0.12.0 spec/views/curation_concerns/base/unauthorized.html.erb_spec.rb
curation_concerns-0.12.0.pre9 spec/views/curation_concerns/base/unauthorized.html.erb_spec.rb
curation_concerns-0.12.0.pre8 spec/views/curation_concerns/base/unauthorized.html.erb_spec.rb
curation_concerns-0.12.0.pre7 spec/views/curation_concerns/base/unauthorized.html.erb_spec.rb
curation_concerns-0.12.0.pre6 spec/views/curation_concerns/base/unauthorized.html.erb_spec.rb
curation_concerns-0.12.0.pre5 spec/views/curation_concerns/base/unauthorized.html.erb_spec.rb
curation_concerns-0.12.0.pre4 spec/views/curation_concerns/base/unauthorized.html.erb_spec.rb
curation_concerns-0.12.0.pre3 spec/views/curation_concerns/base/unauthorized.html.erb_spec.rb
curation_concerns-0.12.0.pre2 spec/views/curation_concerns/base/unauthorized.html.erb_spec.rb
curation_concerns-0.12.0.pre1 spec/views/curation_concerns/base/unauthorized.html.erb_spec.rb
curation_concerns-0.11.0 spec/views/curation_concerns/base/unauthorized.html.erb_spec.rb