Commit 43442be4 authored by Valery Sizov's avatar Valery Sizov Committed by Sean McGivern

Fix specs after removing assignee_id field

parent b1aa91fb
......@@ -32,5 +32,7 @@ class RemoveAssigneeIdFromIssue < ActiveRecord::Migration
def down
add_column :issues, :assignee_id, :integer
add_concurrent_index :issues, :assignee_id
execute('UPDATE issues SET assignee_id = (SELECT user_id FROM issue_assignees WHERE issue_assignees.issue_id = issues.id LIMIT 1)')
end
end
......@@ -138,7 +138,7 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
private
def assigned_to_me(key)
project.send(key).where(assignee_id: current_user.id)
project.send(key).assigned_to(current_user)
end
def project
......
......@@ -45,7 +45,7 @@ describe Members::AuthorizedDestroyService do
expect { described_class.new(member, member_user).execute }
.to change { number_of_assigned_issuables(member_user) }.from(4).to(2)
expect(issue.reload.assignee_id).to be_nil
expect(issue.reload.assignee_ids).to be_empty
expect(merge_request.reload.assignee_id).to be_nil
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment