Sha256: 990e4a1479c5e771e7c3b3f4f5e1eecd5fcce0fb9dea6ac983260ce3820e9e21
Contents?: true
Size: 607 Bytes
Versions: 4
Compression:
Stored size: 607 Bytes
Contents
# frozen_string_literal: true require "rails_helper" module Archangel RSpec.describe Entry, type: :model do context "validations" do it { expect(subject).to validate_presence_of(:collection_id) } it { expect(subject).to validate_presence_of(:value) } it { expect(subject).to allow_value(nil).for(:available_at) } it { expect(subject).to allow_value(Time.current).for(:available_at) } it { expect(subject).not_to allow_value("invalid").for(:available_at) } end context "associations" do it { expect(subject).to belong_to(:collection) } end end end
Version data entries
4 entries across 4 versions & 1 rubygems