diff options
Diffstat (limited to 'spec/controllers/import/gitlab_controller_spec.rb')
-rw-r--r-- | spec/controllers/import/gitlab_controller_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/controllers/import/gitlab_controller_spec.rb b/spec/controllers/import/gitlab_controller_spec.rb index f757b7c69cf..117c934ad5d 100644 --- a/spec/controllers/import/gitlab_controller_spec.rb +++ b/spec/controllers/import/gitlab_controller_spec.rb @@ -30,6 +30,14 @@ RSpec.describe Import::GitlabController do expect(session[:gitlab_access_token]).to eq(token) expect(controller).to redirect_to(status_import_gitlab_url) end + + it "importable_repos should return an array" do + allow_next_instance_of(Gitlab::GitlabImport::Client) do |instance| + allow(instance).to receive(:projects).and_return([{ "id": 1 }].to_enum) + end + + expect(controller.send(:importable_repos)).to be_an_instance_of(Array) + end end describe "GET status" do |