Skip to content

Commit

Permalink
Resolve conflict in cherry-pick of ac1838192e05559f4a35634bdee126649f…
Browse files Browse the repository at this point in the history
…19ab01 and change the commit message
  • Loading branch information
afthabvp authored and ai-squared committed Dec 19, 2024
1 parent 798e4f4 commit 259b109
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
15 changes: 15 additions & 0 deletions server/spec/requests/api/v1/models_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,21 @@
expect(response_hash[:data].count).to eql(8)
expect(response_hash.dig(:data, 0, :type)).to eq("models")
expect(response_hash.dig(:links, :first)).to include("http://www.example.com/api/v1/models?page=1&per_page=20")
<<<<<<< HEAD
=======
end

it "returns success and no models when the data is empty" do
workspace.models.destroy_all
get "/api/v1/models", headers: auth_headers(user, workspace_id)
expect(response).to have_http_status(:ok)
response_hash = JSON.parse(response.body).with_indifferent_access
expect(response_hash[:data].count).to eql(0)
expect(response_hash.dig(:links, :first)).to include("http://www.example.com/api/v1/models?page=1")
expect(response_hash.dig(:links, :last)).to include("http://www.example.com/api/v1/models?page=1")
expect(response_hash.dig(:links, :next)).to be_nil
expect(response_hash.dig(:links, :prev)).to be_nil
>>>>>>> ac183819 (chore(CE): list api accept per page (#732))
end

it "returns success and all mode for viewer role" do
Expand Down
3 changes: 3 additions & 0 deletions server/spec/requests/api/v1/sync_runs_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@

context "when it is an authenticated user" do
it "returns success and fetch sync " do
<<<<<<< HEAD
<<<<<<< HEAD
get "/api/v1/syncs/#{sync.id}/sync_runs", headers: auth_headers(user, workspace_id)
=======
=======
>>>>>>> ac183819 (chore(CE): list api accept per page (#732))
get "/api/v1/syncs/#{sync.id}/sync_runs?page=1&per_page=20", headers: auth_headers(user, workspace_id)
response_hash = JSON.parse(response.body).with_indifferent_access
>>>>>>> ac183819 (chore(CE): list api accept per page (#732))
Expand Down

0 comments on commit 259b109

Please sign in to comment.