diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2017-03-01 16:59:03 +0000 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2017-03-06 19:18:26 +0000 |
commit | 005749a616c19b90d6ec0415df9ae5e35151e33c (patch) | |
tree | f1618dbe99a4ed60980dc94f831864f9e701c589 /spec/factories | |
parent | 2b474dc2b226460782413e634792cf83e791173b (diff) | |
download | gitlab-ce-005749a616c19b90d6ec0415df9ae5e35151e33c.tar.gz |
apply codestyle and implementation changes to the respective feature codepersonal_access_token_api_and_impersonation_token
Diffstat (limited to 'spec/factories')
-rw-r--r-- | spec/factories/personal_access_tokens.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/spec/factories/personal_access_tokens.rb b/spec/factories/personal_access_tokens.rb index 1905b22935b..7b15ba47de1 100644 --- a/spec/factories/personal_access_tokens.rb +++ b/spec/factories/personal_access_tokens.rb @@ -8,16 +8,20 @@ FactoryGirl.define do scopes ['api'] impersonation false - factory :revoked_personal_access_token do + trait :impersonation do + impersonation true + end + + trait :revoked do revoked true end - factory :expired_personal_access_token do + trait :expired do expires_at { 1.day.ago } end - factory :impersonation_personal_access_token do - impersonation true + trait :invalid do + token nil end end end |