2012-10-09 04:14:17 -04:00
|
|
|
# == Schema Information
|
|
|
|
#
|
|
|
|
# Table name: protected_branches
|
|
|
|
#
|
2015-01-22 12:40:03 -05:00
|
|
|
# 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
|
2012-10-09 04:14:17 -04:00
|
|
|
#
|
|
|
|
|
2012-02-15 15:02:33 -05:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe ProtectedBranch do
|
2012-05-10 18:43:12 -04:00
|
|
|
describe 'Associations' do
|
2015-02-12 13:17:35 -05:00
|
|
|
it { is_expected.to belong_to(:project) }
|
2012-05-10 18:43:12 -04:00
|
|
|
end
|
|
|
|
|
2012-09-26 14:17:17 -04:00
|
|
|
describe "Mass assignment" do
|
|
|
|
end
|
|
|
|
|
2012-05-10 18:43:12 -04:00
|
|
|
describe 'Validation' do
|
2015-02-12 13:17:35 -05:00
|
|
|
it { is_expected.to validate_presence_of(:project) }
|
|
|
|
it { is_expected.to validate_presence_of(:name) }
|
2012-05-10 18:43:12 -04:00
|
|
|
end
|
2012-02-15 15:02:33 -05:00
|
|
|
end
|