require 'rails_helper'

RSpec.describe Language, type: :model do
  it { is_expected.to validate_presence_of :name}
  it { is_expected.to validate_uniqueness_of :name}
end

require 'rails_helper'

RSpec.describe Language, type: :model do
  it 'has a valid factory' do
    expect(create :language).to be_valid
  end
  it { is_expected.to validate_presence_of :name}
  it { is_expected.to validate_uniqueness_of :name}
end

Add factory validity spec to language model
Add factory validity spec to language model
