Sha256: 24fa222e72873e5d03ce7c46860be186298e151bd43e0ca522b00ff2c90080c2
Contents?: true
Size: 647 Bytes
Versions: 1
Compression:
Stored size: 647 Bytes
Contents
# frozen_string_literal: true require "rails_helper" module Archangel RSpec.describe Entry, type: :model do context "validations" do it { is_expected.to validate_presence_of(:collection_id) } it { is_expected.to validate_presence_of(:value) } it { is_expected.to allow_value(nil).for(:available_at) } it { is_expected.to allow_value("").for(:available_at) } it { is_expected.to allow_value(Time.current).for(:available_at) } it { is_expected.to_not allow_value("invalid").for(:available_at) } end context "associations" do it { is_expected.to belong_to(:collection) } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
archangel-0.0.6 | spec/models/archangel/entry_spec.rb |