As we reevaluate how to best support and maintain Staging Ref in the future, we encourage development teams using this environment to highlight their use cases in the following issue: https://gitlab.com/gitlab-com/gl-infra/software-delivery/framework/software-delivery-framework-issue-tracker/-/issues/36.

Skip to content
Snippets Groups Projects
Unverified Commit fc168367 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Add tests for GitlabPostReceive

parent 119aae7d
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -5,7 +5,7 @@ describe GitlabAccess do
let(:repository_path) { "/home/git/repositories" }
let(:repo_name) { 'dzaporozhets/gitlab-ci' }
let(:repo_path) { File.join(repository_path, repo_name) + ".git" }
let(:gitlab_access) { GitlabAccess.new(repo_path, 'key-123', '') }
let(:gitlab_access) { GitlabAccess.new(repo_path, 'key-123', 'wow') }
before do
GitlabConfig.any_instance.stub(repos_path: repository_path)
Loading
Loading
@@ -14,5 +14,6 @@ describe GitlabAccess do
describe :initialize do
it { gitlab_access.repo_name.should == repo_name }
it { gitlab_access.repo_path.should == repo_path }
it { gitlab_access.changes.should == ['wow'] }
end
end
require 'spec_helper'
require 'gitlab_post_receive'
describe GitlabPostReceive do
let(:repository_path) { "/home/git/repositories" }
let(:repo_name) { 'dzaporozhets/gitlab-ci' }
let(:repo_path) { File.join(repository_path, repo_name) + ".git" }
let(:gitlab_post_receive) { GitlabPostReceive.new(repo_path, 'key-123', 'wow') }
before do
GitlabConfig.any_instance.stub(repos_path: repository_path)
end
describe :initialize do
it { gitlab_post_receive.repo_path.should == repo_path }
it { gitlab_post_receive.changes.should == ['wow'] }
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment