debian-mirror-gitlab/spec/models/personal_access_token_spec.rb
2016-06-22 15:30:34 +05:30

15 lines
433 B
Ruby

require 'spec_helper'
describe PersonalAccessToken, models: true do
describe ".generate" do
it "generates a random token" do
personal_access_token = PersonalAccessToken.generate({})
expect(personal_access_token.token).to be_present
end
it "doesn't save the record" do
personal_access_token = PersonalAccessToken.generate({})
expect(personal_access_token).not_to be_persisted
end
end
end