2015-11-13 13:22:46 -05:00
|
|
|
# == Schema Information
|
|
|
|
#
|
|
|
|
# Table name: releases
|
|
|
|
#
|
|
|
|
# id :integer not null, primary key
|
|
|
|
# tag :string(255)
|
|
|
|
# description :text
|
|
|
|
# project_id :integer
|
|
|
|
# created_at :datetime
|
|
|
|
# updated_at :datetime
|
|
|
|
#
|
|
|
|
|
2015-11-05 05:03:02 -05:00
|
|
|
require 'rails_helper'
|
|
|
|
|
|
|
|
RSpec.describe Release, type: :model do
|
2015-11-06 09:43:59 -05:00
|
|
|
let(:release) { create(:release) }
|
|
|
|
|
|
|
|
it { expect(release).to be_valid }
|
|
|
|
|
|
|
|
describe 'associations' do
|
|
|
|
it { is_expected.to belong_to(:project) }
|
|
|
|
end
|
|
|
|
|
|
|
|
describe 'validation' do
|
|
|
|
it { is_expected.to validate_presence_of(:project) }
|
|
|
|
it { is_expected.to validate_presence_of(:description) }
|
|
|
|
end
|
2015-11-05 05:03:02 -05:00
|
|
|
end
|