diff options
author | Rémy Coutable <remy@rymai.me> | 2016-10-24 16:44:38 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-10-24 16:44:38 +0200 |
commit | 146d4348ca6812e26729de40a831f4ae8c27fde6 (patch) | |
tree | b0ba1207d7f74e42f1411fe53595cfdc3973f0ff /spec | |
parent | d04ce833376243c92a8714d9dd5a2f0c29a49923 (diff) | |
parent | f73d83db76ae8386ad4db604efb40156593b7a7a (diff) | |
download | gitlab-ce-146d4348ca6812e26729de40a831f4ae8c27fde6.tar.gz |
Merge branch 'luishgo/gitlab-ce-18898-filter-commits-per-path'
See merge request !4814.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/requests/api/commits_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/requests/api/commits_spec.rb b/spec/requests/api/commits_spec.rb index 66fa0c0c01f..a6e8550fac3 100644 --- a/spec/requests/api/commits_spec.rb +++ b/spec/requests/api/commits_spec.rb @@ -72,6 +72,17 @@ describe API::API, api: true do expect(json_response['message']).to include "\"since\" must be a timestamp in ISO 8601 format" end end + + context "path optional parameter" do + it "returns project commits matching provided path parameter" do + path = 'files/ruby/popen.rb' + + get api("/projects/#{project.id}/repository/commits?path=#{path}", user) + + expect(json_response.size).to eq(3) + expect(json_response.first["id"]).to eq("570e7b2abdd848b95f2f578043fc23bd6f6fd24d") + end + end end describe "Create a commit with multiple files and actions" do |