Sha256: f71e1b963c9e59de742221f0e6d88bd2d6c7b7124ab1248f7322f829447228f4

Contents?: true

Size: 936 Bytes

Versions: 7

Compression:

Stored size: 936 Bytes

Contents

require 'spec_helper'

describe Kuhsaft::PublishState, type: :model do
  context 'unpublished' do
    before do
      @publish_state = Kuhsaft::PublishState.new(name: 'unpublished', value: Kuhsaft::PublishState::UNPUBLISHED)
    end

    it 'should be UNPUBLISHED' do
      expect(@publish_state.value).to be(Kuhsaft::PublishState::UNPUBLISHED)
    end
  end

  context 'published' do
    before do
      @publish_state = Kuhsaft::PublishState.new(name: 'published', value: Kuhsaft::PublishState::PUBLISHED)
    end

    it 'should be PUBLISHED' do
      expect(@publish_state.value).to be(Kuhsaft::PublishState::PUBLISHED)
    end
  end

  context 'published_at' do
    before do
      @publish_state = Kuhsaft::PublishState.new(name: 'published_at', value: Kuhsaft::PublishState::PUBLISHED_AT)
    end

    it 'should be PUBLISHED_AT' do
      expect(@publish_state.value).to be(Kuhsaft::PublishState::PUBLISHED_AT)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
kuhsaft-2.6.3 spec/models/publish_state_spec.rb
kuhsaft-2.6.2 spec/models/publish_state_spec.rb
kuhsaft-2.6.1 spec/models/publish_state_spec.rb
kuhsaft-2.5.2 spec/models/publish_state_spec.rb
kuhsaft-2.6.0 spec/models/publish_state_spec.rb
kuhsaft-2.5.1 spec/models/publish_state_spec.rb
kuhsaft-2.5.0 spec/models/publish_state_spec.rb