gitlab-org--gitlab-foss/spec/models/term_agreement_spec.rb
Thong Kuah a2cfc150ce Add # frozen_string_literal to spec/models
Adds `# frozen_string_literal: true` to spec/models ruby files
2019-04-01 14:37:54 +13:00

19 lines
470 B
Ruby

# frozen_string_literal: true
require 'spec_helper'
describe TermAgreement do
describe 'validations' do
it { is_expected.to validate_presence_of(:term) }
it { is_expected.to validate_presence_of(:user) }
end
describe '.accepted' do
it 'only includes accepted terms' do
accepted = create(:term_agreement, :accepted)
create(:term_agreement, :declined)
expect(described_class.accepted).to contain_exactly(accepted)
end
end
end