gitlab-org--gitlab-foss/spec/models/protected_branch_spec.rb
Jeroen van Baarsen 0c4a70a306 Updated rspec to rspec 3.x syntax
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-02-12 19:17:35 +01:00

27 lines
679 B
Ruby

# == Schema Information
#
# Table name: protected_branches
#
# 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
#
require 'spec_helper'
describe ProtectedBranch do
describe 'Associations' do
it { is_expected.to belong_to(:project) }
end
describe "Mass assignment" do
end
describe 'Validation' do
it { is_expected.to validate_presence_of(:project) }
it { is_expected.to validate_presence_of(:name) }
end
end