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
path: root/spec
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-03-12 15:47:15 +0300
committerDouwe Maan <douwe@gitlab.com>2015-03-12 15:47:15 +0300
commit3175438f02ca4bc0469aca097e02b2671865ef43 (patch)
tree0fb6bc2462867c64e4b773d57eea4c8a3f177c8c /spec
parent82bb3ec33d1978101231ac2cc144be647417105e (diff)
Fix missing GitHub organisation repositories on import page.
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/import/github_controller_spec.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/controllers/import/github_controller_spec.rb b/spec/controllers/import/github_controller_spec.rb
index b8820413406..5b967bfcc0c 100644
--- a/spec/controllers/import/github_controller_spec.rb
+++ b/spec/controllers/import/github_controller_spec.rb
@@ -27,17 +27,20 @@ describe Import::GithubController do
describe "GET status" do
before do
@repo = OpenStruct.new(login: 'vim', full_name: 'asd/vim')
+ @org = OpenStruct.new(login: 'company')
+ @org_repo = OpenStruct.new(login: 'company', full_name: 'company/repo')
end
it "assigns variables" do
@project = create(:project, import_type: 'github', creator_id: user.id)
controller.stub_chain(:client, :repos).and_return([@repo])
- controller.stub_chain(:client, :orgs).and_return([])
+ controller.stub_chain(:client, :orgs).and_return([@org])
+ controller.stub_chain(:client, :org_repos).with(@org.login).and_return([@org_repo])
get :status
expect(assigns(:already_added_projects)).to eq([@project])
- expect(assigns(:repos)).to eq([@repo])
+ expect(assigns(:repos)).to eq([@repo, @org_repo])
end
it "does not show already added project" do