-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Martin Fenner
committed
Oct 20, 2019
1 parent
507503e
commit 3160040
Showing
7 changed files
with
185 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
require "rails_helper" | ||
|
||
describe "UsersController", type: :controller, vcr: true do | ||
subject { UsersController.new } | ||
|
||
it "get_meta" do | ||
response = subject.get_meta | ||
expect(response["created"].first).to eq("count"=>29, "id"=>"2011", "title"=>"2011") | ||
expect(response["resourceTypes"].first).to eq("count"=>323850, "id"=>"text", "title"=>"Text") | ||
end | ||
|
||
it "get_meta with user_id" do | ||
user_id = "0000-0003-1419-2405" | ||
response = subject.get_meta(user_id: user_id) | ||
expect(response["created"].first).to eq("count"=>2, "id"=>"2018", "title"=>"2018") | ||
expect(response["resourceTypes"].first).to eq("count"=>27, "id"=>"text", "title"=>"Text") | ||
end | ||
end |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
57 changes: 57 additions & 0 deletions
57
spec/fixtures/vcr_cassettes/UsersController/get_meta_with_user_id.yml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
53 changes: 53 additions & 0 deletions
53
spec/fixtures/vcr_cassettes/users/GET_/users/_id/when_the_record_exists/returns_the_user.yml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters