discourse/spec/models/badge.rb
2014-03-14 21:49:26 +05:30

17 lines
331 B
Ruby

require 'spec_helper'
require_dependency 'badge'
describe Badge do
it { should belong_to :badge_type }
context 'validations' do
before(:each) { Fabricate(:badge) }
it { should validate_presence_of :name }
it { should validate_presence_of :badge_type }
it { should validate_uniqueness_of :name }
end
end