Commit a2cfb441 authored by Douwe Maan's avatar Douwe Maan

Tag service specs

parent 13d6bab1
require 'spec_helper' require 'spec_helper'
describe ArchiveRepositoryService do describe ArchiveRepositoryService, services: true do
let(:project) { create(:project) } let(:project) { create(:project) }
subject { ArchiveRepositoryService.new(project, "master", "zip") } subject { ArchiveRepositoryService.new(project, "master", "zip") }
......
require 'spec_helper' require 'spec_helper'
module Ci module Ci
describe CreateCommitService do describe CreateCommitService, services: true do
let(:service) { CreateCommitService.new } let(:service) { CreateCommitService.new }
let(:project) { FactoryGirl.create(:ci_project) } let(:project) { FactoryGirl.create(:ci_project) }
let(:user) { nil } let(:user) { nil }
......
require 'spec_helper' require 'spec_helper'
describe Ci::CreateTriggerRequestService do describe Ci::CreateTriggerRequestService, services: true do
let(:service) { Ci::CreateTriggerRequestService.new } let(:service) { Ci::CreateTriggerRequestService.new }
let(:gl_project) { create(:project) } let(:gl_project) { create(:project) }
let(:project) { gl_project.ensure_gitlab_ci_project } let(:project) { gl_project.ensure_gitlab_ci_project }
......
require 'spec_helper' require 'spec_helper'
describe Ci::EventService do describe Ci::EventService, services: true do
let(:project) { FactoryGirl.create :ci_project } let(:project) { FactoryGirl.create :ci_project }
let(:user) { double(username: "root", id: 1) } let(:user) { double(username: "root", id: 1) }
......
require 'spec_helper' require 'spec_helper'
module Ci module Ci
describe ImageForBuildService do describe ImageForBuildService, services: true do
let(:service) { ImageForBuildService.new } let(:service) { ImageForBuildService.new }
let(:project) { FactoryGirl.create(:ci_project) } let(:project) { FactoryGirl.create(:ci_project) }
let(:gl_project) { FactoryGirl.create(:project, gitlab_ci_project: project) } let(:gl_project) { FactoryGirl.create(:project, gitlab_ci_project: project) }
......
require 'spec_helper' require 'spec_helper'
module Ci module Ci
describe RegisterBuildService do describe RegisterBuildService, services: true do
let!(:service) { RegisterBuildService.new } let!(:service) { RegisterBuildService.new }
let!(:gl_project) { FactoryGirl.create :empty_project } let!(:gl_project) { FactoryGirl.create :empty_project }
let!(:commit) { FactoryGirl.create :ci_commit, gl_project: gl_project } let!(:commit) { FactoryGirl.create :ci_commit, gl_project: gl_project }
......
require 'spec_helper' require 'spec_helper'
describe Ci::WebHookService do describe Ci::WebHookService, services: true do
let(:project) { FactoryGirl.create :ci_project } let(:project) { FactoryGirl.create :ci_project }
let(:gl_project) { FactoryGirl.create :empty_project, gitlab_ci_project: project } let(:gl_project) { FactoryGirl.create :empty_project, gitlab_ci_project: project }
let(:commit) { FactoryGirl.create :ci_commit, gl_project: gl_project } let(:commit) { FactoryGirl.create :ci_commit, gl_project: gl_project }
......
require 'spec_helper' require 'spec_helper'
describe CreateReleaseService do describe CreateReleaseService, services: true do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:user) { create(:user) } let(:user) { create(:user) }
let(:tag_name) { project.repository.tag_names.first } let(:tag_name) { project.repository.tag_names.first }
......
require 'spec_helper' require 'spec_helper'
describe CreateSnippetService do describe CreateSnippetService, services: true do
before do before do
@user = create :user @user = create :user
@admin = create :user, admin: true @admin = create :user, admin: true
......
require 'spec_helper' require 'spec_helper'
describe DestroyGroupService do describe DestroyGroupService, services: true do
let!(:user) { create(:user) } let!(:user) { create(:user) }
let!(:group) { create(:group) } let!(:group) { create(:group) }
let!(:project) { create(:project, namespace: group) } let!(:project) { create(:project, namespace: group) }
......
require 'spec_helper' require 'spec_helper'
describe EventCreateService do describe EventCreateService, services: true do
let(:service) { EventCreateService.new } let(:service) { EventCreateService.new }
describe 'Issues' do describe 'Issues' do
......
require 'spec_helper' require 'spec_helper'
describe GitHooksService do describe GitHooksService, services: true do
include RepoHelpers include RepoHelpers
let(:user) { create :user } let(:user) { create :user }
......
require 'spec_helper' require 'spec_helper'
describe GitPushService do describe GitPushService, services: true do
include RepoHelpers include RepoHelpers
let(:user) { create :user } let(:user) { create :user }
......
require 'spec_helper' require 'spec_helper'
describe GitTagPushService do describe GitTagPushService, services: true do
include RepoHelpers include RepoHelpers
let(:user) { create :user } let(:user) { create :user }
......
require 'spec_helper' require 'spec_helper'
describe Issues::BulkUpdateService do describe Issues::BulkUpdateService, services: true do
let(:issue) { create(:issue, project: @project) } let(:issue) { create(:issue, project: @project) }
before do before do
......
require 'spec_helper' require 'spec_helper'
describe Issues::CloseService do describe Issues::CloseService, services: true do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:user2) { create(:user) } let(:user2) { create(:user) }
let(:issue) { create(:issue, assignee: user2) } let(:issue) { create(:issue, assignee: user2) }
......
require 'spec_helper' require 'spec_helper'
describe Issues::CreateService do describe Issues::CreateService, services: true do
let(:project) { create(:empty_project) } let(:project) { create(:empty_project) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
require 'spec_helper' require 'spec_helper'
describe Issues::UpdateService do describe Issues::UpdateService, services: true do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:user2) { create(:user) } let(:user2) { create(:user) }
let(:user3) { create(:user) } let(:user3) { create(:user) }
......
require 'spec_helper' require 'spec_helper'
describe MergeRequests::CloseService do describe MergeRequests::CloseService, services: true do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:user2) { create(:user) } let(:user2) { create(:user) }
let(:merge_request) { create(:merge_request, assignee: user2) } let(:merge_request) { create(:merge_request, assignee: user2) }
......
require 'spec_helper' require 'spec_helper'
describe MergeRequests::CreateService do describe MergeRequests::CreateService, services: true do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
require 'spec_helper' require 'spec_helper'
describe MergeRequests::MergeService do describe MergeRequests::MergeService, services: true do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:user2) { create(:user) } let(:user2) { create(:user) }
let(:merge_request) { create(:merge_request, assignee: user2) } let(:merge_request) { create(:merge_request, assignee: user2) }
......
require 'spec_helper' require 'spec_helper'
describe MergeRequests::RefreshService do describe MergeRequests::RefreshService, services: true do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:user) { create(:user) } let(:user) { create(:user) }
let(:service) { MergeRequests::RefreshService } let(:service) { MergeRequests::RefreshService }
......
require 'spec_helper' require 'spec_helper'
describe MergeRequests::ReopenService do describe MergeRequests::ReopenService, services: true do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:user2) { create(:user) } let(:user2) { create(:user) }
let(:merge_request) { create(:merge_request, assignee: user2) } let(:merge_request) { create(:merge_request, assignee: user2) }
......
require 'spec_helper' require 'spec_helper'
describe MergeRequests::UpdateService do describe MergeRequests::UpdateService, services: true do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:user2) { create(:user) } let(:user2) { create(:user) }
let(:user3) { create(:user) } let(:user3) { create(:user) }
......
require 'spec_helper' require 'spec_helper'
describe Milestones::CloseService do describe Milestones::CloseService, services: true do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project) } let(:project) { create(:project) }
let(:milestone) { create(:milestone, title: "Milestone v1.2", project: project) } let(:milestone) { create(:milestone, title: "Milestone v1.2", project: project) }
......
require 'spec_helper' require 'spec_helper'
describe Milestones::CreateService do describe Milestones::CreateService, services: true do
let(:project) { create(:empty_project) } let(:project) { create(:empty_project) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
require 'spec_helper' require 'spec_helper'
describe Notes::CreateService do describe Notes::CreateService, services: true do
let(:project) { create(:empty_project) } let(:project) { create(:empty_project) }
let(:issue) { create(:issue, project: project) } let(:issue) { create(:issue, project: project) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
require 'spec_helper' require 'spec_helper'
describe NotificationService do describe NotificationService, services: true do
let(:notification) { NotificationService.new } let(:notification) { NotificationService.new }
around(:each) do |example| around(:each) do |example|
......
require 'spec_helper' require 'spec_helper'
describe Projects::CreateService do describe Projects::CreateService, services: true do
describe :create_by_user do describe :create_by_user do
before do before do
@user = create :user @user = create :user
......
require 'spec_helper' require 'spec_helper'
describe Projects::DestroyService do describe Projects::DestroyService, services: true do
let!(:user) { create(:user) } let!(:user) { create(:user) }
let!(:project) { create(:project, namespace: user.namespace) } let!(:project) { create(:project, namespace: user.namespace) }
let!(:path) { project.repository.path_to_repo } let!(:path) { project.repository.path_to_repo }
......
require 'spec_helper' require 'spec_helper'
describe Projects::DownloadService do describe Projects::DownloadService, services: true do
describe 'File service' do describe 'File service' do
before do before do
@user = create :user @user = create :user
......
require 'spec_helper' require 'spec_helper'
describe Projects::ForkService do describe Projects::ForkService, services: true do
describe :fork_by_user do describe :fork_by_user do
before do before do
@from_namespace = create(:namespace) @from_namespace = create(:namespace)
......
require 'spec_helper' require 'spec_helper'
describe Projects::TransferService do describe Projects::TransferService, services: true do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group) } let(:group) { create(:group) }
let(:project) { create(:project, namespace: user.namespace) } let(:project) { create(:project, namespace: user.namespace) }
......
require 'spec_helper' require 'spec_helper'
describe Projects::UpdateService do describe Projects::UpdateService, services: true do
describe :update_by_user do describe :update_by_user do
before do before do
@user = create :user @user = create :user
......
require 'spec_helper' require 'spec_helper'
describe Projects::UploadService do describe Projects::UploadService, services: true do
describe 'File service' do describe 'File service' do
before do before do
@user = create :user @user = create :user
......
require 'spec_helper' require 'spec_helper'
describe 'Search::GlobalService' do describe 'Search::GlobalService', services: true do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:public_user) { create(:user) } let(:public_user) { create(:user) }
let(:internal_user) { create(:user) } let(:internal_user) { create(:user) }
......
require 'spec_helper' require 'spec_helper'
describe SystemHooksService do describe SystemHooksService, services: true do
let(:user) { create :user } let(:user) { create :user }
let(:project) { create :project } let(:project) { create :project }
let(:project_member) { create :project_member } let(:project_member) { create :project_member }
......
require 'spec_helper' require 'spec_helper'
describe SystemNoteService do describe SystemNoteService, services: true do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:author) { create(:user) } let(:author) { create(:user) }
let(:noteable) { create(:issue, project: project) } let(:noteable) { create(:issue, project: project) }
......
require 'spec_helper' require 'spec_helper'
describe TestHookService do describe TestHookService, services: true do
let(:user) { create :user } let(:user) { create :user }
let(:project) { create :project } let(:project) { create :project }
let(:hook) { create :project_hook, project: project } let(:hook) { create :project_hook, project: project }
......
require 'spec_helper' require 'spec_helper'
describe UpdateReleaseService do describe UpdateReleaseService, services: true do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:user) { create(:user) } let(:user) { create(:user) }
let(:tag_name) { project.repository.tag_names.first } let(:tag_name) { project.repository.tag_names.first }
......
require 'spec_helper' require 'spec_helper'
describe UpdateSnippetService do describe UpdateSnippetService, services: true do
before do before do
@user = create :user @user = create :user
@admin = create :user, admin: true @admin = create :user, admin: true
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment