-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathcheckins_spec.rb
More file actions
86 lines (77 loc) · 2.38 KB
/
checkins_spec.rb
File metadata and controls
86 lines (77 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
require "swagger_helper"
RSpec.describe "api/v1/checkins", type: :request do
path "/api/checkins" do
get("list checkins") do
response(200, "successful") do
after do |example|
example.metadata[:response][:content] = {
"application/json" => {
example: JSON.parse(response.body, symbolize_names: true)
}
}
end
pending "Not yet implemented, when implemented uncomment the assertion below"
# run_test!
end
end
post("create checkin") do
response(200, "successful") do
after do |example|
example.metadata[:response][:content] = {
"application/json" => {
example: JSON.parse(response.body, symbolize_names: true)
}
}
end
pending "Not yet implemented, when implemented uncomment the assertion below"
# run_test!
end
end
end
path "/api/checkins/{id}" do
# You'll want to customize the parameter types...
parameter name: "id", in: :path, type: :string, description: "id"
get("show checkin") do
response(200, "successful") do
let(:id) { "123" }
after do |example|
example.metadata[:response][:content] = {
"application/json" => {
example: JSON.parse(response.body, symbolize_names: true)
}
}
end
pending "Not yet implemented, when implemented uncomment the assertion below"
# run_test!
end
end
patch("update checkin") do
response(200, "successful") do
let(:id) { "123" }
after do |example|
example.metadata[:response][:content] = {
"application/json" => {
example: JSON.parse(response.body, symbolize_names: true)
}
}
end
pending "Not yet implemented, when implemented uncomment the assertion below"
# run_test!
end
end
put("update checkin") do
response(200, "successful") do
let(:id) { "123" }
after do |example|
example.metadata[:response][:content] = {
"application/json" => {
example: JSON.parse(response.body, symbolize_names: true)
}
}
end
pending "Not yet implemented, when implemented uncomment the assertion below"
# run_test!
end
end
end
end