metamaps--metamaps/spec/models/topic_spec.rb

11 lines
385 B
Ruby
Raw Normal View History

require 'rails_helper'
2015-12-16 14:19:58 +00:00
RSpec.describe Topic, type: :model do
it { is_expected.to belong_to :user }
it { is_expected.to belong_to :metacode }
it { is_expected.to have_many :maps }
2015-12-18 01:26:07 +00:00
it { is_expected.to have_many :mappings }
it { is_expected.to validate_presence_of :permission }
it { is_expected.to validate_inclusion_of(:permission).in_array Perm::ISSIONS.map(&:to_s) }
end