diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-03-12 13:47:15 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-03-12 13:47:15 +0100 |
commit | 3175438f02ca4bc0469aca097e02b2671865ef43 (patch) | |
tree | 0fb6bc2462867c64e4b773d57eea4c8a3f177c8c /spec/controllers | |
parent | 82bb3ec33d1978101231ac2cc144be647417105e (diff) | |
download | gitlab-ce-3175438f02ca4bc0469aca097e02b2671865ef43.tar.gz |
Fix missing GitHub organisation repositories on import page.
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/import/github_controller_spec.rb | 7 |
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 |