Commit 68684a3a authored by Thong Kuah's avatar Thong Kuah

Remove un-necessary variables

The user variable is already set in the outer context.
parent 1baeaf77
...@@ -60,8 +60,6 @@ describe Projects::PipelineSchedulesController do ...@@ -60,8 +60,6 @@ describe Projects::PipelineSchedulesController do
end end
describe 'GET #new' do describe 'GET #new' do
let_it_be(:user) { create(:user) }
before do before do
project.add_developer(user) project.add_developer(user)
sign_in(user) sign_in(user)
...@@ -77,8 +75,6 @@ describe Projects::PipelineSchedulesController do ...@@ -77,8 +75,6 @@ describe Projects::PipelineSchedulesController do
describe 'POST #create' do describe 'POST #create' do
describe 'functionality' do describe 'functionality' do
let_it_be(:user) { create(:user) }
before do before do
project.add_developer(user) project.add_developer(user)
sign_in(user) sign_in(user)
...@@ -149,7 +145,6 @@ describe Projects::PipelineSchedulesController do ...@@ -149,7 +145,6 @@ describe Projects::PipelineSchedulesController do
describe 'PUT #update' do describe 'PUT #update' do
describe 'functionality' do describe 'functionality' do
let_it_be(:user) { create(:user) }
let!(:pipeline_schedule) { create(:ci_pipeline_schedule, project: project, owner: user) } let!(:pipeline_schedule) { create(:ci_pipeline_schedule, project: project, owner: user) }
before do before do
...@@ -383,7 +378,6 @@ describe Projects::PipelineSchedulesController do ...@@ -383,7 +378,6 @@ describe Projects::PipelineSchedulesController do
end end
describe 'POST #play', :clean_gitlab_redis_cache do describe 'POST #play', :clean_gitlab_redis_cache do
let_it_be(:user) { create(:user) }
let(:ref) { 'master' } let(:ref) { 'master' }
before do before do
...@@ -442,8 +436,6 @@ describe Projects::PipelineSchedulesController do ...@@ -442,8 +436,6 @@ describe Projects::PipelineSchedulesController do
end end
describe 'DELETE #destroy' do describe 'DELETE #destroy' do
let_it_be(:user) { create(:user) }
context 'when a developer makes the request' do context 'when a developer makes the request' do
before do before do
project.add_developer(user) project.add_developer(user)
......
...@@ -4,7 +4,7 @@ require 'spec_helper' ...@@ -4,7 +4,7 @@ require 'spec_helper'
describe Projects::WikisController do describe Projects::WikisController do
let_it_be(:project) { create(:project, :public, :repository) } let_it_be(:project) { create(:project, :public, :repository) }
let_it_be(:user) { project.owner } let(:user) { project.owner }
let(:project_wiki) { ProjectWiki.new(project, user) } let(:project_wiki) { ProjectWiki.new(project, user) }
let(:wiki) { project_wiki.wiki } let(:wiki) { project_wiki.wiki }
let(:wiki_title) { 'page title test' } let(:wiki_title) { 'page title test' }
......
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