fixed tests
This commit is contained in:
parent
60f083ad61
commit
67b9fa51dc
4 changed files with 4 additions and 1 deletions
|
@ -47,6 +47,7 @@ class IssuesController < ApplicationController
|
||||||
def create
|
def create
|
||||||
@issue = @project.issues.new(params[:issue])
|
@issue = @project.issues.new(params[:issue])
|
||||||
@issue.author = current_user
|
@issue.author = current_user
|
||||||
|
|
||||||
if @issue.save && @issue.assignee != current_user
|
if @issue.save && @issue.assignee != current_user
|
||||||
Notify.new_issue_email(@issue).deliver
|
Notify.new_issue_email(@issue).deliver
|
||||||
end
|
end
|
||||||
|
|
|
@ -24,6 +24,6 @@
|
||||||
- else
|
- else
|
||||||
= link_to 'Resolve', project_issue_path(@project, issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "cgray", :remote => true
|
= link_to 'Resolve', project_issue_path(@project, issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "cgray", :remote => true
|
||||||
- if can? current_user, :write_issue, issue
|
- if can? current_user, :write_issue, issue
|
||||||
= link_to 'Edit', edit_project_issue_path(@project, issue), :class => "cgray", :remote => true
|
= link_to 'Edit', edit_project_issue_path(@project, issue), :class => "cgray edit-issue-link", :remote => true
|
||||||
- if can?(current_user, :admin_issue, @project) || issue.author == current_user
|
- if can?(current_user, :admin_issue, @project) || issue.author == current_user
|
||||||
= link_to 'Destroy', [@project, issue], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-issue negative", :id => "destroy_issue_#{issue.id}"
|
= link_to 'Destroy', [@project, issue], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-issue negative", :id => "destroy_issue_#{issue.id}"
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
- if @issue.valid?
|
- if @issue.valid?
|
||||||
:plain
|
:plain
|
||||||
$("#new_issue_dialog").dialog("close");
|
$("#new_issue_dialog").dialog("close");
|
||||||
|
$("#issues-table").prepend("#{escape_javascript(render(:partial => 'show', :locals => {:issue => @issue} ))}");
|
||||||
$.ajax({type: "GET", url: location.href, dataType: "script"});
|
$.ajax({type: "GET", url: location.href, dataType: "script"});
|
||||||
- else
|
- else
|
||||||
:plain
|
:plain
|
||||||
|
|
|
@ -169,6 +169,7 @@ describe "Issues" do
|
||||||
:assignee => @user,
|
:assignee => @user,
|
||||||
:project => project
|
:project => project
|
||||||
visit project_issues_path(project)
|
visit project_issues_path(project)
|
||||||
|
page.execute_script("$('.action-links').css('display', 'block');")
|
||||||
click_link "Edit"
|
click_link "Edit"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue