BigW Consortium Gitlab

Commit bf6961ca by Lin Jen-Shin

Just let the user to create the namespace

parent d919f924
......@@ -2,8 +2,8 @@ require 'spec_helper'
describe ForkedProjectLink, "add link on fork" do
let(:project_from) { create(:project, :repository) }
let(:namespace) { create(:namespace) }
let(:user) { create(:user, namespace: namespace) }
let(:user) { create(:user) }
let(:namespace) { user.namespace }
before do
create(:project_member, :reporter, user: user, project: project_from)
......
......@@ -3,8 +3,8 @@ require 'spec_helper'
describe Projects::ForkService, services: true do
describe 'fork by user' do
before do
@from_namespace = create(:namespace)
@from_user = create(:user, namespace: @from_namespace )
@from_user = create(:user)
@from_namespace = @from_user.namespace
avatar = fixture_file_upload(Rails.root + "spec/fixtures/dk.png", "image/png")
@from_project = create(:project,
:repository,
......@@ -13,8 +13,8 @@ describe Projects::ForkService, services: true do
star_count: 107,
avatar: avatar,
description: 'wow such project')
@to_namespace = create(:namespace)
@to_user = create(:user, namespace: @to_namespace)
@to_user = create(:user)
@to_namespace = @to_user.namespace
@from_project.add_user(@to_user, :developer)
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment