Skip to content

Commit

Permalink
change to v2 endpoint to get project details, for access to membershi…
Browse files Browse the repository at this point in the history
…p_type
  • Loading branch information
stuzart committed Nov 5, 2024
1 parent 98074b4 commit 84b6bf8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 23 deletions.
2 changes: 1 addition & 1 deletion lib/nels/rest/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def projects
end

def project(project_id)
perform("sbi/projects/#{project_id}", :get)
perform("v2/sbi/projects/#{project_id}", :get)
end

def datasets(project_id)
Expand Down
3 changes: 2 additions & 1 deletion test/unit/nels/nels_rest_client_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ class NelsRestClientTest < ActiveSupport::TestCase
VCR.use_cassette('nels/get_project') do
res = @rest_client.project(@project_id)

assert_equal 21, res.count
assert_equal 20, res.count
assert_equal @project_id, res['id']
assert_equal 'seek_pilot1', res['name']
assert_equal 4, res['membership_type']
end
end

Expand Down
30 changes: 9 additions & 21 deletions test/vcr_cassettes/nels/get_project.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 84b6bf8

Please sign in to comment.