Adam Townsend
cabb4daded
split up the nil? and empty? cases, because they are different
...
situations
2023-10-12 14:27:31 -07:00
Adam Townsend
1e61a76ded
added 2 more tests for empty and missing url data posting to links
2023-10-12 14:27:02 -07:00
Adam Townsend
ac3e9f14cd
added links route for API interactions
2023-10-12 11:42:43 -07:00
Adam Townsend
5ee9351362
added db initialization to make sure the db exists and is up to date
...
before tests
2023-10-12 11:42:14 -07:00
Adam Townsend
2964e06639
added before and after actions
...
+ before initializes the db
+ after cleans the db
2023-10-12 11:40:15 -07:00
Adam Townsend
d1a0fc0222
change request to use the /links path, to fit more into a RESTful API
...
format
+ also renamed the test to better describe the behavior
2023-10-12 11:32:00 -07:00
Adam Townsend
4a82174526
implemented API create endpoint
...
+ added plugins to read json and access the header to parse the request
for an API request
+ fixed logic where url param is nil
+ refactored the new code to a variable to be reused easier
+ if CONTENT_TYPE header is application/json, reply with json
- there could be more refactoring (maybe separating it to a different
endpoint) to handle other scenarios, we'll work on that later
2023-10-11 19:21:43 -07:00
Adam Townsend
3ae20255f6
DRY it out a little
2023-10-11 19:21:21 -07:00
Adam Townsend
f69c53bf29
removed unnecessary variable
2023-10-11 19:20:07 -07:00
Adam Townsend
7d6c098047
added more to the spec test for creating a new link
2023-10-11 19:18:47 -07:00
Adam Townsend
3421e18f21
added more logic for running tests without killing the whole pipeline, and outputting rspec results
2023-10-11 12:05:33 -07:00
Adam Townsend
0dec27a01c
added rspec step in tests stage, adjusted should clause
2023-10-11 11:04:08 -07:00
Adam Townsend
c45cf6ab51
started building out rspec specs for API functionality
2023-10-11 11:01:46 -07:00
Adam Townsend
e50667b392
split homepage out into homepage and submit feature sets
2023-10-10 17:29:23 -07:00