Sha256: 852c72f3aab2febb5650c786f763d21530bd7d60ca499be85b86f7b33c25b9b2

Contents?: true

Size: 754 Bytes

Versions: 1

Compression:

Stored size: 754 Bytes

Contents

require 'spec_helper'

describe Sufia::Migration::Survey::Item, type: :model do
  it { is_expected.to respond_to(:object_id) }
  it { is_expected.to respond_to(:object_class) }
  it { is_expected.to respond_to(:object_title) }
  it { is_expected.to respond_to(:migration_status) }

  context "with specific values" do
    let(:item) { described_class.create(object_id: "myid", object_class: "MyClass", object_title: "My Title", migration_status: :successful) }
    subject { described_class.find(item.id) }
    it "stores the attributes" do
      expect(subject.object_id).to eq "myid"
      expect(subject.object_class).to eq "MyClass"
      expect(subject.object_title).to eq "My Title"
      expect(subject.successful?).to be_truthy
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sufia-6.7.0 spec/lib/sufia/migration/survey_item_spec.rb