End of day commit
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Employee do
|
||||
context 'class methods' do
|
||||
describe '.count_by_email' do
|
||||
it 'is zero without employees' do
|
||||
described_class.count_by_email('admin@example.com').should be_zero
|
||||
end
|
||||
|
||||
it 'is one when an email already exists' do
|
||||
create :employee, email: 'alreadyexisting@example.com'
|
||||
described_class.count_by_email('alreadyexisting@example.com').should be 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user