Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-09-15 23:00:17 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2015-09-15 23:00:17 +0300
commit8d5c9935ffb8fa41f831742ac287fd010a006b42 (patch)
treee71a241aeb8e5ae123d82968058a15315d6c35ec /spec/models
parent209c72c4a1acc103cff5d9f732865ad2dadea871 (diff)
Fix: models/ci/project_spec.rb
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/ci/project_spec.rb18
1 files changed, 7 insertions, 11 deletions
diff --git a/spec/models/ci/project_spec.rb b/spec/models/ci/project_spec.rb
index 48f76e11ce9..7c0fbbd60bb 100644
--- a/spec/models/ci/project_spec.rb
+++ b/spec/models/ci/project_spec.rb
@@ -124,19 +124,15 @@ describe Ci::Project do
end
describe 'Project.parse' do
- let(:project_dump) { YAML.load File.read(Rails.root.join('spec/support/gitlab_stubs/raw_project.yml')) }
- let(:parsed_project) { Ci::Project.parse(project_dump) }
+ let(:project) { FactoryGirl.create :project }
+ subject { Ci::Project.parse(project) }
- it { expect(parsed_project).to be_valid }
- it { expect(parsed_project).to be_kind_of(Ci::Project) }
- it { expect(parsed_project.name).to eq("GitLab / api.gitlab.org") }
- it { expect(parsed_project.gitlab_id).to eq(189) }
- it { expect(parsed_project.gitlab_url).to eq("http://demo.gitlab.com/gitlab/api-gitlab-org") }
-
- it "parses plain hash" do
- expect(Ci::Project.parse(project_dump).name).to eq("GitLab / api.gitlab.org")
- end
+ it { is_expected.to be_valid }
+ it { is_expected.to be_kind_of(Ci::Project) }
+ it { expect(subject.name).to eq(project.name_with_namespace) }
+ it { expect(subject.gitlab_id).to eq(4) }
+ it { expect(subject.gitlab_url).to eq("http://localhost/namespace5/gitlabhq") }
end
describe :repo_url_with_auth do