Commit 31f1fb27 authored by Robert Speicher's avatar Robert Speicher

Use `empty_project` where possible in spec/features/dashboard

parent 22e52db9
......@@ -3,7 +3,7 @@ require 'spec_helper'
RSpec.describe 'Dashboard Archived Project' do
let(:user) { create :user }
let(:project) { create :project}
let(:archived_project) { create(:project, :archived) }
let(:archived_project) { create(:empty_project, :archived) }
before do
project.team << [user, :master]
......
......@@ -2,7 +2,7 @@ require 'spec_helper'
feature 'Tooltips on .timeago dates', js: true do
let(:user) { create(:user) }
let(:project) { create(:project, name: 'test', namespace: user.namespace) }
let(:project) { create(:empty_project, name: 'test', namespace: user.namespace) }
let(:created_date) { Date.yesterday.to_time }
let(:expected_format) { created_date.in_time_zone.strftime('%b %-d, %Y %l:%M%P') }
......
......@@ -2,8 +2,8 @@ require 'spec_helper'
describe 'Dashboard > label filter', js: true do
let(:user) { create(:user) }
let(:project) { create(:project, name: 'test', namespace: user.namespace) }
let(:project2) { create(:project, name: 'test2', path: 'test2', namespace: user.namespace) }
let(:project) { create(:empty_project, name: 'test', namespace: user.namespace) }
let(:project2) { create(:empty_project, name: 'test2', path: 'test2', namespace: user.namespace) }
let(:label) { create(:label, title: 'bug', color: '#ff0000') }
let(:label2) { create(:label, title: 'bug') }
......
......@@ -4,7 +4,7 @@ feature 'Dashboard > milestone filter', :js do
include FilterItemSelectHelper
let(:user) { create(:user) }
let(:project) { create(:project, name: 'test', namespace: user.namespace) }
let(:project) { create(:empty_project, name: 'test', namespace: user.namespace) }
let(:milestone) { create(:milestone, title: 'v1.0', project: project) }
let(:milestone2) { create(:milestone, title: 'v2.0', project: project) }
let!(:issue) { create :issue, author: user, project: project, milestone: milestone }
......
......@@ -3,7 +3,7 @@ require 'rails_helper'
feature 'Dashboard > Todo target states' do
let(:user) { create(:user) }
let(:author) { create(:user) }
let(:project) { create(:project, :public) }
let(:project) { create(:empty_project, :public) }
before do
sign_in(user)
......
......@@ -3,7 +3,7 @@ require 'spec_helper'
feature 'Dashboard Todos' do
let(:user) { create(:user) }
let(:author) { create(:user) }
let(:project) { create(:project, :public) }
let(:project) { create(:empty_project, :public) }
let(:issue) { create(:issue, due_date: Date.today) }
context 'User does not have todos' do
......@@ -212,7 +212,7 @@ feature 'Dashboard Todos' do
note1 = create(:note_on_issue, note: "Hello #{label1.to_reference(format: :name)}", noteable_id: issue.id, noteable_type: 'Issue', project: issue.project)
create(:todo, :mentioned, project: project, target: issue, user: user, note_id: note1.id)
project2 = create(:project, :public)
project2 = create(:empty_project, :public)
label2 = create(:label, project: project2)
issue2 = create(:issue, project: project2)
note2 = create(:note_on_issue, note: "Test #{label2.to_reference(format: :name)}", noteable_id: issue2.id, noteable_type: 'Issue', project: project2)
......
......@@ -2,9 +2,9 @@ require 'spec_helper'
describe 'Dashboard > User filters projects' do
let(:user) { create(:user) }
let(:project) { create(:project, name: 'Victorialand', namespace: user.namespace) }
let(:project) { create(:empty_project, name: 'Victorialand', namespace: user.namespace) }
let(:user2) { create(:user) }
let(:project2) { create(:project, name: 'Treasure', namespace: user2.namespace) }
let(:project2) { create(:empty_project, name: 'Treasure', namespace: user2.namespace) }
before do
project.team << [user, :master]
......
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