From d839b880a256f208ae5a0d877765bc5fcbfcd44d Mon Sep 17 00:00:00 2001 From: Mark Chao Date: Mon, 14 May 2018 10:07:53 +0800 Subject: Add created_by_me and assigned_to_me scopes Deprecate corresponding dash versions created-by-me and assigned-to-me --- spec/requests/api/issues_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'spec/requests/api/issues_spec.rb') diff --git a/spec/requests/api/issues_spec.rb b/spec/requests/api/issues_spec.rb index 90f9c4ad214..6457af77729 100644 --- a/spec/requests/api/issues_spec.rb +++ b/spec/requests/api/issues_spec.rb @@ -106,6 +106,15 @@ describe API::Issues do it 'returns issues assigned to me' do issue2 = create(:issue, assignees: [user2], project: project) + get api('/issues', user2), scope: 'assigned_to_me' + + expect_paginated_array_response(size: 1) + expect(first_issue['id']).to eq(issue2.id) + end + + it 'returns issues assigned to me (kebab-case)' do + issue2 = create(:issue, assignees: [user2], project: project) + get api('/issues', user2), scope: 'assigned-to-me' expect_paginated_array_response(size: 1) -- cgit v1.2.1