21 lines
406 B
Ruby
21 lines
406 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'rails_helper'
|
|
|
|
RSpec.describe Role do
|
|
subject { create :role }
|
|
|
|
describe '#name' do
|
|
def allow_value(*)
|
|
super.for :name
|
|
end
|
|
|
|
it { is_expected.to validate_presence_of :name }
|
|
|
|
it { is_expected.not_to allow_value 'foobar' }
|
|
|
|
it { is_expected.to allow_value 'superuser' }
|
|
end
|
|
|
|
pending "add some examples to (or delete) #{__FILE__}"
|
|
end
|