Sha256: 979f212b8975eb4e28e784d2d2b19165ee49057bbb89cf50b44521e154b3c10a

Contents?: true

Size: 832 Bytes

Versions: 7

Compression:

Stored size: 832 Bytes

Contents

require 'spec_helper'

describe CurationConcern::BaseActor do
  let(:user) { User.new }
  let(:curation_concern) { GenericFile.new }
  let(:attributes) { {visibility: visibility} }
  let(:visibility) { nil }
  subject { CurationConcern.actor(curation_concern, user, attributes)}
  describe 'with visibility "1"' do
    let(:visibility) { "1" }
    it 'should have visibility' do
      subject.send(:visibility).should == visibility
    end
    it 'should have visibility' do
      subject.send(:visibility_may_have_changed?).should == true
    end

  end
  describe 'with missing visibility' do
    let(:visibility) { nil }
    it 'should have visibility' do
      subject.send(:visibility).should be_nil
    end
    it 'should have visibility' do
      subject.send(:visibility_may_have_changed?).should == false
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
curate-0.3.2 spec/services/curation_concern/base_actor_spec.rb
curate-0.3.1 spec/services/curation_concern/base_actor_spec.rb
curate-0.2.0 spec/services/curation_concern/base_actor_spec.rb
curate-0.1.3 spec/services/curation_concern/base_actor_spec.rb
curate-0.1.2 spec/services/curation_concern/base_actor_spec.rb
curate-0.1.1 spec/services/curation_concern/base_actor_spec.rb
curate-0.1.0 spec/services/curation_concern/base_actor_spec.rb