diff options
Diffstat (limited to 'spec/lib/gitlab/fogbugz_import')
-rw-r--r-- | spec/lib/gitlab/fogbugz_import/project_creator_spec.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/lib/gitlab/fogbugz_import/project_creator_spec.rb b/spec/lib/gitlab/fogbugz_import/project_creator_spec.rb index 6b8bb2229a9..8be9f55dbb6 100644 --- a/spec/lib/gitlab/fogbugz_import/project_creator_spec.rb +++ b/spec/lib/gitlab/fogbugz_import/project_creator_spec.rb @@ -4,7 +4,6 @@ require 'spec_helper' RSpec.describe Gitlab::FogbugzImport::ProjectCreator do let(:user) { create(:user) } - let(:repo) do instance_double(Gitlab::FogbugzImport::Repository, name: 'Vim', @@ -13,10 +12,11 @@ RSpec.describe Gitlab::FogbugzImport::ProjectCreator do raw_data: '') end + let(:repo_name) { 'new_name' } let(:uri) { 'https://testing.fogbugz.com' } let(:token) { 'token' } let(:fb_session) { { uri: uri, token: token } } - let(:project_creator) { described_class.new(repo, fb_session, user.namespace, user) } + let(:project_creator) { described_class.new(repo, repo_name, user.namespace, user, fb_session) } subject do project_creator.execute @@ -26,4 +26,9 @@ RSpec.describe Gitlab::FogbugzImport::ProjectCreator do expect(subject.persisted?).to eq(true) expect(subject.visibility_level).to eq(Gitlab::VisibilityLevel::PRIVATE) end + + it 'creates project with provided name and path' do + expect(subject.name).to eq(repo_name) + expect(subject.path).to eq(repo_name) + end end |