19 lines
363 B
Ruby
19 lines
363 B
Ruby
|
|
require 'spec_helper'
|
||
|
|
|
||
|
|
describe Diagnostic do
|
||
|
|
let (:user) { FactoryGirl.create(:user) }
|
||
|
|
let (:diagnostic) { FactoryGirl.create(:diagnostic, user: user) }
|
||
|
|
|
||
|
|
it 'can be made' do
|
||
|
|
diagnostic.save!
|
||
|
|
end
|
||
|
|
|
||
|
|
it "validates type" do
|
||
|
|
diagnostic = FactoryGirl.build(:diagnostic, user: user, type: 'bleh')
|
||
|
|
|
||
|
|
diagnostic.errors[:type].should == []
|
||
|
|
|
||
|
|
end
|
||
|
|
|
||
|
|
end
|