Tag service specs

This commit is contained in:
Douwe Maan 2015-12-09 11:55:49 +01:00
parent 13d6bab177
commit a2cfb44157
41 changed files with 41 additions and 41 deletions

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe ArchiveRepositoryService do
describe ArchiveRepositoryService, services: true do
let(:project) { create(:project) }
subject { ArchiveRepositoryService.new(project, "master", "zip") }

View file

@ -1,7 +1,7 @@
require 'spec_helper'
module Ci
describe CreateCommitService do
describe CreateCommitService, services: true do
let(:service) { CreateCommitService.new }
let(:project) { FactoryGirl.create(:ci_project) }
let(:user) { nil }

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe Ci::CreateTriggerRequestService do
describe Ci::CreateTriggerRequestService, services: true do
let(:service) { Ci::CreateTriggerRequestService.new }
let(:gl_project) { create(:project) }
let(:project) { gl_project.ensure_gitlab_ci_project }

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe Ci::EventService do
describe Ci::EventService, services: true do
let(:project) { FactoryGirl.create :ci_project }
let(:user) { double(username: "root", id: 1) }

View file

@ -1,7 +1,7 @@
require 'spec_helper'
module Ci
describe ImageForBuildService do
describe ImageForBuildService, services: true do
let(:service) { ImageForBuildService.new }
let(:project) { FactoryGirl.create(:ci_project) }
let(:gl_project) { FactoryGirl.create(:project, gitlab_ci_project: project) }

View file

@ -1,7 +1,7 @@
require 'spec_helper'
module Ci
describe RegisterBuildService do
describe RegisterBuildService, services: true do
let!(:service) { RegisterBuildService.new }
let!(:gl_project) { FactoryGirl.create :empty_project }
let!(:commit) { FactoryGirl.create :ci_commit, gl_project: gl_project }

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe Ci::WebHookService do
describe Ci::WebHookService, services: true do
let(:project) { FactoryGirl.create :ci_project }
let(:gl_project) { FactoryGirl.create :empty_project, gitlab_ci_project: project }
let(:commit) { FactoryGirl.create :ci_commit, gl_project: gl_project }

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe CreateReleaseService do
describe CreateReleaseService, services: true do
let(:project) { create(:project) }
let(:user) { create(:user) }
let(:tag_name) { project.repository.tag_names.first }

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe CreateSnippetService do
describe CreateSnippetService, services: true do
before do
@user = create :user
@admin = create :user, admin: true

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe DestroyGroupService do
describe DestroyGroupService, services: true do
let!(:user) { create(:user) }
let!(:group) { create(:group) }
let!(:project) { create(:project, namespace: group) }

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe EventCreateService do
describe EventCreateService, services: true do
let(:service) { EventCreateService.new }
describe 'Issues' do

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe GitHooksService do
describe GitHooksService, services: true do
include RepoHelpers
let(:user) { create :user }

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe GitPushService do
describe GitPushService, services: true do
include RepoHelpers
let(:user) { create :user }

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe GitTagPushService do
describe GitTagPushService, services: true do
include RepoHelpers
let(:user) { create :user }

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe Issues::BulkUpdateService do
describe Issues::BulkUpdateService, services: true do
let(:issue) { create(:issue, project: @project) }
before do

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe Issues::CloseService do
describe Issues::CloseService, services: true do
let(:user) { create(:user) }
let(:user2) { create(:user) }
let(:issue) { create(:issue, assignee: user2) }

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe Issues::CreateService do
describe Issues::CreateService, services: true do
let(:project) { create(:empty_project) }
let(:user) { create(:user) }

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe Issues::UpdateService do
describe Issues::UpdateService, services: true do
let(:user) { create(:user) }
let(:user2) { create(:user) }
let(:user3) { create(:user) }

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe MergeRequests::CloseService do
describe MergeRequests::CloseService, services: true do
let(:user) { create(:user) }
let(:user2) { create(:user) }
let(:merge_request) { create(:merge_request, assignee: user2) }

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe MergeRequests::CreateService do
describe MergeRequests::CreateService, services: true do
let(:project) { create(:project) }
let(:user) { create(:user) }

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe MergeRequests::MergeService do
describe MergeRequests::MergeService, services: true do
let(:user) { create(:user) }
let(:user2) { create(:user) }
let(:merge_request) { create(:merge_request, assignee: user2) }

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe MergeRequests::RefreshService do
describe MergeRequests::RefreshService, services: true do
let(:project) { create(:project) }
let(:user) { create(:user) }
let(:service) { MergeRequests::RefreshService }

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe MergeRequests::ReopenService do
describe MergeRequests::ReopenService, services: true do
let(:user) { create(:user) }
let(:user2) { create(:user) }
let(:merge_request) { create(:merge_request, assignee: user2) }

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe MergeRequests::UpdateService do
describe MergeRequests::UpdateService, services: true do
let(:user) { create(:user) }
let(:user2) { create(:user) }
let(:user3) { create(:user) }

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe Milestones::CloseService do
describe Milestones::CloseService, services: true do
let(:user) { create(:user) }
let(:project) { create(:project) }
let(:milestone) { create(:milestone, title: "Milestone v1.2", project: project) }

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe Milestones::CreateService do
describe Milestones::CreateService, services: true do
let(:project) { create(:empty_project) }
let(:user) { create(:user) }

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe Notes::CreateService do
describe Notes::CreateService, services: true do
let(:project) { create(:empty_project) }
let(:issue) { create(:issue, project: project) }
let(:user) { create(:user) }

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe NotificationService do
describe NotificationService, services: true do
let(:notification) { NotificationService.new }
around(:each) do |example|

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe Projects::CreateService do
describe Projects::CreateService, services: true do
describe :create_by_user do
before do
@user = create :user

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe Projects::DestroyService do
describe Projects::DestroyService, services: true do
let!(:user) { create(:user) }
let!(:project) { create(:project, namespace: user.namespace) }
let!(:path) { project.repository.path_to_repo }

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe Projects::DownloadService do
describe Projects::DownloadService, services: true do
describe 'File service' do
before do
@user = create :user

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe Projects::ForkService do
describe Projects::ForkService, services: true do
describe :fork_by_user do
before do
@from_namespace = create(:namespace)

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe Projects::TransferService do
describe Projects::TransferService, services: true do
let(:user) { create(:user) }
let(:group) { create(:group) }
let(:project) { create(:project, namespace: user.namespace) }

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe Projects::UpdateService do
describe Projects::UpdateService, services: true do
describe :update_by_user do
before do
@user = create :user

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe Projects::UploadService do
describe Projects::UploadService, services: true do
describe 'File service' do
before do
@user = create :user

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe 'Search::GlobalService' do
describe 'Search::GlobalService', services: true do
let(:user) { create(:user) }
let(:public_user) { create(:user) }
let(:internal_user) { create(:user) }

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe SystemHooksService do
describe SystemHooksService, services: true do
let(:user) { create :user }
let(:project) { create :project }
let(:project_member) { create :project_member }

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe SystemNoteService do
describe SystemNoteService, services: true do
let(:project) { create(:project) }
let(:author) { create(:user) }
let(:noteable) { create(:issue, project: project) }

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe TestHookService do
describe TestHookService, services: true do
let(:user) { create :user }
let(:project) { create :project }
let(:hook) { create :project_hook, project: project }

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe UpdateReleaseService do
describe UpdateReleaseService, services: true do
let(:project) { create(:project) }
let(:user) { create(:user) }
let(:tag_name) { project.repository.tag_names.first }

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe UpdateSnippetService do
describe UpdateSnippetService, services: true do
before do
@user = create :user
@admin = create :user, admin: true