BigW Consortium Gitlab

protected_branch_spec.rb 693 Bytes
Newer Older
Dmitriy Zaporozhets committed
1 2 3 4
# == Schema Information
#
# Table name: protected_branches
#
Dmitriy Zaporozhets committed
5 6 7 8 9 10
#  id                  :integer          not null, primary key
#  project_id          :integer          not null
#  name                :string(255)      not null
#  created_at          :datetime
#  updated_at          :datetime
#  developers_can_push :boolean          default(FALSE), not null
Dmitriy Zaporozhets committed
11 12
#

13 14
require 'spec_helper'

Douwe Maan committed
15
describe ProtectedBranch, models: true do
16
  describe 'Associations' do
17
    it { is_expected.to belong_to(:project) }
18 19
  end

20 21 22
  describe "Mass assignment" do
  end

23
  describe 'Validation' do
24 25
    it { is_expected.to validate_presence_of(:project) }
    it { is_expected.to validate_presence_of(:name) }
26
  end
27
end