Fix spec to set import_url before attempting to create import_data
This commit is contained in:
parent
565b3a1839
commit
328da189d2
|
@ -54,12 +54,12 @@ describe Gitlab::BitbucketImport::Client, lib: true do
|
||||||
context 'project import' do
|
context 'project import' do
|
||||||
it 'calls .from_project with no errors' do
|
it 'calls .from_project with no errors' do
|
||||||
project = create(:empty_project)
|
project = create(:empty_project)
|
||||||
|
project.import_url = "ssh://git@bitbucket.org/test/test.git"
|
||||||
project.create_or_update_import_data(credentials:
|
project.create_or_update_import_data(credentials:
|
||||||
{ user: "git",
|
{ user: "git",
|
||||||
password: nil,
|
password: nil,
|
||||||
bb_session: { bitbucket_access_token: "test",
|
bb_session: { bitbucket_access_token: "test",
|
||||||
bitbucket_access_token_secret: "test" } })
|
bitbucket_access_token_secret: "test" } })
|
||||||
project.import_url = "ssh://git@bitbucket.org/test/test.git"
|
|
||||||
|
|
||||||
expect { described_class.from_project(project) }.not_to raise_error
|
expect { described_class.from_project(project) }.not_to raise_error
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue