summaryrefslogtreecommitdiff
path: root/spec/models/release_spec.rb
blob: 72ecb442a361a7576704efff942c01c2d4250542 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# == 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
#

require 'rails_helper'

RSpec.describe Release, type: :model do
  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
end