summaryrefslogtreecommitdiff
path: root/spec/requests/issues_spec.rb
diff options
context:
space:
mode:
authorVincent Bonmalais <vb.kouno@gmail.com>2012-11-06 14:31:55 +1100
committerVincent Bonmalais <vb.kouno@gmail.com>2012-11-13 22:27:45 +1100
commit80fb38de7abdfacbf5ad2e0150b934c1392721f0 (patch)
tree302ee55b21e8206ab44cef819a583803b9bb0c6f /spec/requests/issues_spec.rb
parentd52f06f38013540a9798686aa37c4dad120c3d74 (diff)
downloadgitlab-ce-80fb38de7abdfacbf5ad2e0150b934c1392721f0.tar.gz
Remove backward compatibility of factories.
Diffstat (limited to 'spec/requests/issues_spec.rb')
-rw-r--r--spec/requests/issues_spec.rb34
1 files changed, 17 insertions, 17 deletions
diff --git a/spec/requests/issues_spec.rb b/spec/requests/issues_spec.rb
index 15ee5d174a0..c95409d3a5f 100644
--- a/spec/requests/issues_spec.rb
+++ b/spec/requests/issues_spec.rb
@@ -1,11 +1,11 @@
require 'spec_helper'
describe "Issues" do
- let(:project) { Factory :project }
+ let(:project) { create(:project) }
before do
login_as :user
- @user2 = Factory :user
+ @user2 = create(:user)
project.add_access(@user, :read, :write)
project.add_access(@user2, :read, :write)
@@ -13,10 +13,10 @@ describe "Issues" do
describe "Edit issue", js: true do
before do
- @issue = Factory :issue,
- author: @user,
- assignee: @user,
- project: project
+ @issue = create(:issue,
+ author: @user,
+ assignee: @user,
+ project: project)
visit project_issues_path(project)
click_link "Edit"
end
@@ -46,11 +46,11 @@ describe "Issues" do
describe "Search issue", js: true do
before do
['foobar', 'foobar2', 'gitlab'].each do |title|
- @issue = Factory :issue,
- author: @user,
- assignee: @user,
- project: project,
- title: title
+ @issue = create(:issue,
+ author: @user,
+ assignee: @user,
+ project: project,
+ title: title)
@issue.save
end
end
@@ -93,15 +93,15 @@ describe "Issues" do
describe "Filter issue" do
before do
['foobar', 'barbaz', 'gitlab'].each do |title|
- @issue = Factory :issue,
- author: @user,
- assignee: @user,
- project: project,
- title: title
+ @issue = create(:issue,
+ author: @user,
+ assignee: @user,
+ project: project,
+ title: title)
end
@issue = Issue.first
- @issue.milestone = Factory(:milestone, project: project)
+ @issue.milestone = create(:milestone, project: project)
@issue.assignee = nil
@issue.save
end