Project

General

Profile

« Previous | Next » 

Revision 4:7d3a38ab714a

Added by Haru Iida over 8 years ago

  • ID 7d3a38ab714a

fixes #884 Can't add a relation to issue of the parent project.

View differences:

test/functional/commit_relation_editor_controller_test.rb
59 59
      changeset.reload
60 60
      assert_equal(0, changeset.issues.length)
61 61
    end
62
    
63
    should "not add relation if issue belongs wrong project." do
64
      @request.session[:user_id] = 1
65
      changeset = Changeset.generate!
66
      project = Project.find(2)
67
      issue = Issue.generate_for_project!(project)
68
      issue_id = issue.id
69
      post :new, :id => 1, :changeset_id => changeset.id, :issue_id => issue_id
70
      assert_response :redirect
71
      changeset.reload
72
      assert_equal(0, changeset.issues.length)
73
    end
62 74
  end
63 75
  
64 76
  context "destroy" do

Also available in: Unified diff