debian-mirror-gitlab/spec/models/push_event_payload_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
460 B
Ruby
Raw Normal View History

2019-07-07 11:18:12 +05:30
# frozen_string_literal: true
2017-09-10 17:25:29 +05:30
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe PushEventPayload do
2019-02-15 15:39:39 +05:30
it_behaves_like 'having unique enum values'
2017-09-10 17:25:29 +05:30
describe 'saving payloads' do
it 'does not allow commit messages longer than 70 characters' do
event = create(:push_event)
payload = build(:push_event_payload, event: event)
expect(payload).to be_valid
payload.commit_title = 'a' * 100
expect(payload).not_to be_valid
end
end
end