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
|
||||
@issue = @project.issues.new(params[:issue])
|
||||
@issue.author = current_user
|
||||
|
||||
if @issue.save && @issue.assignee != current_user
|
||||
Notify.new_issue_email(@issue).deliver
|
||||
end
|
||||
|
|
|
@ -24,6 +24,6 @@
|
|||
- else
|
||||
= 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
|
||||
= 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
|
||||
= 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?
|
||||
:plain
|
||||
$("#new_issue_dialog").dialog("close");
|
||||
$("#issues-table").prepend("#{escape_javascript(render(:partial => 'show', :locals => {:issue => @issue} ))}");
|
||||
$.ajax({type: "GET", url: location.href, dataType: "script"});
|
||||
- else
|
||||
:plain
|
||||
|
|
|
@ -169,6 +169,7 @@ describe "Issues" do
|
|||
:assignee => @user,
|
||||
:project => project
|
||||
visit project_issues_path(project)
|
||||
page.execute_script("$('.action-links').css('display', 'block');")
|
||||
click_link "Edit"
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue