Fix merge request closed filter. Fixed one more test

This commit is contained in:
Dmitriy Zaporozhets 2013-02-21 14:11:24 +02:00
parent be817c53c6
commit 4a137651ec
2 changed files with 7 additions and 1 deletions

View file

@ -66,6 +66,10 @@ class MergeRequest < ActiveRecord::Base
scope :merged, -> { with_state(:merged) }
# Closed scope for merge request should return
# both merged and closed mr's
scope :closed, -> { with_states(:closed, :merged) }
class << self
def find_all_by_branch(branch_name)
where("source_branch LIKE :branch OR target_branch LIKE :branch", branch: branch_name)

View file

@ -136,7 +136,9 @@ describe "On a merge request diff", js: true, focus: true do
end
it "should be removed when canceled" do
first(".js-close-discussion-note-form").trigger("click")
within(".file form[rel$='4735dfc552ad7bf15ca468adc3cad9d05b624490_185_185']") do
find(".js-close-discussion-note-form").trigger("click")
end
should have_no_css(".js-temp-notes-holder")
end