Sha256: 307d8e1a675b25794e4005b34f11ada53c52d3e51d3a06802a557fa0e378727f

Contents?: true

Size: 805 Bytes

Versions: 2

Compression:

Stored size: 805 Bytes

Contents

require 'spec_helper'

module Landable
  # descriptions
  describe Librarian do
    # setup
    before do
      @page = create(:page)
    end

    # tests
    it 'should soft delete a content managed Item' do
      # setup
      current_page = Page.find(@page.id)

      # actions
      current_page.deactivate

      # expectations
      expect(current_page).to be_a Page
      expect(current_page.deleted_at).to_not be_blank

      # end
    end

    it 'should restore a content managed Item' do
      # setup
      Page.find(@page.id).deactivate
      restored_page = Page.find(@page.id)

      # actions
      restored_page.reactivate

      # expectations
      expect(restored_page).to be_a Page
      expect(restored_page.deleted_at).to be_blank

      # end
    end

    # end
  end

  # end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
landable-1.14.0 spec/concerns/landable/librarian.rb
landable-1.13.2 spec/concerns/landable/librarian.rb