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