Newer
Older
dmpopidor / spec / models / token_permission_type_spec.rb
@Bodacious Bodacious on 27 Jul 2018 453 bytes Add specs for all models
require 'rails_helper'

RSpec.describe TokenPermissionType, type: :model do

  context "validations" do

    it { is_expected.to validate_presence_of(:token_type) }

  end

  describe '#to_s' do

    let!(:token_permission_type) do
      build(:token_permission_type, token_type: 'templates')
    end

    subject { token_permission_type.to_s }

    it "returns the token_type attribute" do
      expect(subject).to eql('templates')
    end

  end

end