Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNihad Abbasov <narkoz.2008@gmail.com>2011-10-26 22:35:17 +0400
committerNihad Abbasov <narkoz.2008@gmail.com>2011-10-26 22:35:17 +0400
commitf1e6d9be90c9f02ecbb334900e34f9a2a15c4530 (patch)
tree8bd2a0de081fe6763f7738bb45433043e3dddcea /spec/requests/issues_spec.rb
parente0f4a37f3d9fba676c60d28677dfd1d7c9dfd5ac (diff)
parentf1e25f25635c64f1c994d01c90a8e50c8be1f81f (diff)
Merge branch 'assets-refactoring' into dev
Conflicts: app/controllers/issues_controller.rb app/views/issues/index.html.haml
Diffstat (limited to 'spec/requests/issues_spec.rb')
-rw-r--r--spec/requests/issues_spec.rb44
1 files changed, 22 insertions, 22 deletions
diff --git a/spec/requests/issues_spec.rb b/spec/requests/issues_spec.rb
index b7f4d411287..184f82931b7 100644
--- a/spec/requests/issues_spec.rb
+++ b/spec/requests/issues_spec.rb
@@ -3,13 +3,13 @@ require 'spec_helper'
describe "Issues" do
let(:project) { Factory :project }
- before do
+ before do
login_as :user
project.add_access(@user, :read, :write)
end
describe "GET /issues" do
- before do
+ before do
@issue = Factory :issue,
:author => @user,
:assignee => @user,
@@ -24,23 +24,23 @@ describe "Issues" do
it { should have_content(@issue.project.name) }
it { should have_content(@issue.assignee.name) }
- describe "Destroy" do
- before do
+ describe "Destroy" do
+ before do
# admin access to remove issue
@user.users_projects.destroy_all
project.add_access(@user, :read, :write, :admin)
visit project_issues_path(project)
end
- it "should remove entry" do
+ it "should remove entry" do
expect {
click_link "destroy_issue_#{@issue.id}"
}.to change { Issue.count }.by(-1)
end
end
- describe "statuses", :js => true do
- before do
+ describe "statuses", :js => true do
+ before do
@closed_issue = Factory :issue,
:author => @user,
:assignee => @user,
@@ -48,18 +48,18 @@ describe "Issues" do
:closed => true
end
- it "should show only open" do
+ it "should show only open" do
should have_content(@issue.title)
should have_no_content(@closed_issue.title)
end
- it "should show only closed" do
+ it "should show only closed" do
choose "closed_issues"
should have_no_content(@issue.title)
should have_content(@closed_issue.title)
end
- it "should show all" do
+ it "should show all" do
choose "all_issues"
should have_content(@issue.title)
should have_content(@closed_issue.title)
@@ -67,17 +67,17 @@ describe "Issues" do
end
end
- describe "New issue", :js => true do
- before do
+ describe "New issue", :js => true do
+ before do
visit project_issues_path(project)
click_link "New Issue"
end
- it "should open new issue popup" do
+ it "should open new issue popup" do
page.should have_content("Add new issue")
end
- describe "fill in" do
+ describe "fill in" do
before do
fill_in "issue_title", :with => "bug 345"
fill_in "issue_content", :with => "app bug 345"
@@ -87,7 +87,7 @@ describe "Issues" do
it { expect { click_button "Save" }.to change {Issue.count}.by(1) }
- it "should add new issue to table" do
+ it "should add new issue to table" do
click_button "Save"
page.should_not have_content("Add new issue")
@@ -96,12 +96,12 @@ describe "Issues" do
page.should have_content project.name
end
- it "should call send mail" do
+ it "should call send mail" do
Notify.should_receive(:new_issue_email).and_return(stub(:deliver => true))
click_button "Save"
end
- it "should send valid email to user with email & password" do
+ it "should send valid email to user with email & password" do
click_button "Save"
issue = Issue.last
email = ActionMailer::Base.deliveries.last
@@ -112,8 +112,8 @@ describe "Issues" do
end
end
- describe "Edit issue", :js => true do
- before do
+ describe "Edit issue", :js => true do
+ before do
@issue = Factory :issue,
:author => @user,
:assignee => @user,
@@ -122,11 +122,11 @@ describe "Issues" do
click_link "Edit"
end
- it "should open new issue popup" do
+ it "should open new issue popup" do
page.should have_content("Issue ##{@issue.id}")
end
- describe "fill in" do
+ describe "fill in" do
before do
fill_in "issue_title", :with => "bug 345"
fill_in "issue_content", :with => "app bug 345"
@@ -134,7 +134,7 @@ describe "Issues" do
it { expect { click_button "Save" }.to_not change {Issue.count} }
- it "should update issue fields" do
+ it "should update issue fields" do
click_button "Save"
page.should_not have_content("Issue ##{@issue.id}")