diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-12-19 18:10:32 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-12-19 18:10:32 +0800 |
commit | 5cb63f9aa6c48467ff510d97b0d024cbb2cfa117 (patch) | |
tree | 9d06bb91287c9d7e6f1a9a60c0fccb13e771f257 /spec/factories | |
parent | 1b4a244dbc8d1e5b79feb4f111ec6183afa1b413 (diff) | |
parent | 2c49c1af660a8e69446be442df81f9beaf0cf168 (diff) | |
download | gitlab-ce-5cb63f9aa6c48467ff510d97b0d024cbb2cfa117.tar.gz |
Merge branch 'master' into fix-yaml-variables
* master: (327 commits)
Always use `fixture_file_upload` helper to upload files in tests.
Add CHANGELOG
Move admin application spinach test to rspec
Move admin deploy keys spinach test to rspec
Fix rubocop failures
Store mattermost_url in settings
Improve Mattermost Session specs
Ensure the session is destroyed
Improve session tests
Setup mattermost session
Fix query in Projects::ProjectMembersController to fetch members
Improve test for sort dropdown on members page
Fix sort dropdown alignment
Undo changes on members search button stylesheet
Use factories to create project/group membership on specs
Remove unused id from shared members sort dropdown
Fix sort functionality on project/group members to return invited users
Refactor MembersHelper#filter_group_project_member_path
Remove unnecessary curly braces from sort dropdown partial
Sort group/project members alphabetically by default
...
Diffstat (limited to 'spec/factories')
-rw-r--r-- | spec/factories/notes.rb | 2 | ||||
-rw-r--r-- | spec/factories/personal_access_tokens.rb | 1 | ||||
-rw-r--r-- | spec/factories/projects.rb | 13 |
3 files changed, 15 insertions, 1 deletions
diff --git a/spec/factories/notes.rb b/spec/factories/notes.rb index 6919002dedc..a10ba629760 100644 --- a/spec/factories/notes.rb +++ b/spec/factories/notes.rb @@ -67,7 +67,7 @@ FactoryGirl.define do end trait :on_project_snippet do - noteable { create(:snippet, project: project) } + noteable { create(:project_snippet, project: project) } end trait :system do diff --git a/spec/factories/personal_access_tokens.rb b/spec/factories/personal_access_tokens.rb index da4c72bcb5b..811eab7e15b 100644 --- a/spec/factories/personal_access_tokens.rb +++ b/spec/factories/personal_access_tokens.rb @@ -5,5 +5,6 @@ FactoryGirl.define do name { FFaker::Product.brand } revoked false expires_at { 5.days.from_now } + scopes ['api'] end end diff --git a/spec/factories/projects.rb b/spec/factories/projects.rb index 1166498ddff..0d072d6a690 100644 --- a/spec/factories/projects.rb +++ b/spec/factories/projects.rb @@ -133,4 +133,17 @@ FactoryGirl.define do ) end end + + factory :kubernetes_project, parent: :empty_project do + after :create do |project| + project.create_kubernetes_service( + active: true, + properties: { + namespace: project.path, + api_url: 'https://kubernetes.example.com/api', + token: 'a' * 40, + } + ) + end + end end |