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