summaryrefslogtreecommitdiff
path: root/spec/models/members/member_role_spec.rb
blob: e8993491918426c3ae5b79768c136241980693f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe MemberRole do
  describe 'associations' do
    it { is_expected.to belong_to(:namespace) }
    it { is_expected.to have_many(:members) }
  end

  describe 'validation' do
    subject { described_class.new }

    it { is_expected.to validate_presence_of(:namespace_id) }
    it { is_expected.to validate_presence_of(:base_access_level) }
  end
end