travis-api/spec/lib/model/token_spec.rb
Aakriti Gupta 65f1a29d86 Move travis-core files from /vendor to /lib.
- Re-factor
- Remove code for notifications
- Remove addons
- Remove travis-core gem.
- Ignore logs directory only
- Move core tests to spec/lib
2016-07-20 11:22:25 +02:00

14 lines
294 B
Ruby

describe Token do
it 'generate_token sets the token to a 20 character value' do
Token.new.send(:generate_token).length.should == 20
end
it 'does not generate new token on save' do
token = Token.create!
expect {
token.save
}.to_not change { token.token }
end
end