mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 22:48:45 +08:00
16 lines
292 B
Ruby
16 lines
292 B
Ruby
|
require 'spec_helper'
|
||
|
require_dependency 'badge'
|
||
|
|
||
|
describe Badge do
|
||
|
|
||
|
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
|
||
|
|