summaryrefslogtreecommitdiff
path: root/spec/models/snippet_spec.rb
blob: 2a63584e429607cdf1ecf15e08b6ab8784d3ab85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require 'spec_helper'

describe Snippet do
  describe "Associations" do
    it { should belong_to(:project) }
    it { should belong_to(:author) }
  end

  describe "Validation" do
    it { should validate_presence_of(:title) }
    it { should validate_presence_of(:author_id) }
    it { should validate_presence_of(:project_id) }
    it { should validate_presence_of(:file_name) }
    it { should validate_presence_of(:content) }
  end
end