metamaps--metamaps/spec/models/map_spec.rb

11 lines
337 B
Ruby
Raw Permalink Normal View History

2016-09-24 03:00:46 +00:00
# frozen_string_literal: true
2017-11-25 19:23:47 +00:00
require 'rails_helper'
2015-12-16 14:19:58 +00:00
RSpec.describe Map, type: :model do
2015-12-17 01:16:02 +00:00
it { is_expected.to belong_to :user }
it { is_expected.to validate_presence_of :name }
it { is_expected.to validate_presence_of :permission }
it { is_expected.to validate_inclusion_of(:permission).in_array Perm::ISSIONS.map(&:to_s) }
end