{
	"variables": [],
	"info": {
		"name": "UpPeat",
		"_postman_id": "0d5b78ee-90ed-a4e2-4709-df9bad968230",
		"description": "",
		"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
	},
	"item": [
		{
			"name": "Users",
			"description": "",
			"item": [
				{
					"name": "Get all users",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users",
						"method": "GET",
						"header": [],
						"body": {},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add new user",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"postman.setEnvironmentVariable(\"new_user_id\", jsonData.id);",
									"",
									"tests[\"First name value is correct\"] = jsonData.first_name === \"Test\";",
									"tests[\"Surname value is correct\"] = jsonData.surname === \"User\";",
									"tests[\"Username value is correct\"] = jsonData.user_name === \"test_user1\";",
									"tests[\"Email value is correct\"] = jsonData.email === \"test@user.com\";",
									"tests[\"Is locked value is correct\"] = jsonData.isLocked === false;",
									"tests[\"Full name value is correct\"] = jsonData.full_name === \"Test User\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"first_name\": \"Test\",\n\t\"surname\": \"User\",\n\t\"user_name\": \"test_User1\",\n\t\"email\": \"test@user.com\",\n\t\"password\": \"test1\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add duplicate user",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 400\"] = responseCode.code === 400;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"tests[\"Return message correct\"] = responseBody.has(\"User already exists\");"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"first_name\": \"Test\",\n\t\"surname\": \"User\",\n\t\"user_name\": \"test_User1\",\n\t\"email\": \"test@user.com\",\n\t\"password\": \"test1\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Get new user before login",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 403\"] = responseCode.code === 403;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"tests[\"Response is correct\"] = jsonData.message === \"User must be logged in to access this resource\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users/{{new_user_id}}",
						"method": "GET",
						"header": [],
						"body": {},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Delete user before login",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 403\"] = responseCode.code === 403;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"tests[\"Response is correct\"] = jsonData.message === \"User must be logged in to access this resource\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users/{{new_user_id}}",
						"method": "DELETE",
						"header": [],
						"body": {},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Edit user before login",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 403\"] = responseCode.code === 403;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"tests[\"Response is correct\"] = jsonData.message === \"User must be logged in to access this resource\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users/{{new_user_id}}",
						"method": "PUT",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"first_name\": \"Test\",\n\t\"surname\": \"UserEdit\",\n\t\"user_name\": \"testUserEdit1\",\n\t\"email\": \"test.edit@user.com\",\n\t\"password\": \"testUser1\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Login with incorrect password",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 400\"] = responseCode.code === 400;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Response message correct\"] = jsonData.message === \"Login failed\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users/login",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"user_name\": \"test_user1\",\n\t\"password\": \"test2\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add user with username less than min length",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 500\"] = responseCode.code === 500;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"tests[\"Return message param correct\"] = jsonData[0].param === \"user_name\";",
									"tests[\"Return message correct\"] = jsonData[0].msg === \"Must be between 5 and 20 characters\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"first_name\": \"Test\",\n\t\"surname\": \"User\",\n\t\"user_name\": \"test\",\n\t\"email\": \"test@user.com\",\n\t\"password\": \"test1\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add user with username more than max length",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 500\"] = responseCode.code === 500;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"tests[\"Return message param correct\"] = jsonData[0].param === \"user_name\";",
									"tests[\"Return message correct\"] = jsonData[0].msg === \"Must be between 5 and 20 characters\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"first_name\": \"Test\",\n\t\"surname\": \"User\",\n\t\"user_name\": \"testusertestusertest1\",\n\t\"email\": \"test@user.com\",\n\t\"password\": \"test1\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add user with username with invalid characters",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 500\"] = responseCode.code === 500;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"tests[\"Return message param correct\"] = jsonData[0].param === \"user_name\";",
									"tests[\"Return message correct\"] = jsonData[0].msg === \"Username may contain alphanumeric characters or underscores only\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"first_name\": \"Test\",\n\t\"surname\": \"User\",\n\t\"user_name\": \"test_User*1\",\n\t\"email\": \"test@user.com\",\n\t\"password\": \"test1\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add user with password less than min length",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 500\"] = responseCode.code === 500;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"tests[\"Return message param correct\"] = jsonData[0].param === \"password\";",
									"tests[\"Return message correct\"] = jsonData[0].msg === \"Must be between 5 and 20 characters\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"first_name\": \"Test\",\n\t\"surname\": \"User\",\n\t\"user_name\": \"test_User2\",\n\t\"email\": \"test@user.com\",\n\t\"password\": \"tes1\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add user with password more than max length",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 500\"] = responseCode.code === 500;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"tests[\"Return message param correct\"] = jsonData[0].param === \"password\";",
									"tests[\"Return message correct\"] = jsonData[0].msg === \"Must be between 5 and 20 characters\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"first_name\": \"Test\",\n\t\"surname\": \"User\",\n\t\"user_name\": \"test_User2\",\n\t\"email\": \"test@user.com\",\n\t\"password\": \"testusertestuseruser1\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add user with password with invalid characters",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 500\"] = responseCode.code === 500;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"tests[\"Return message param correct\"] = jsonData[0].param === \"password\";",
									"tests[\"Return message correct\"] = jsonData[0].msg === \"Password must be alphanumeric and may contain underscores\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"first_name\": \"Test\",\n\t\"surname\": \"User\",\n\t\"user_name\": \"test_User2\",\n\t\"email\": \"test@user.com\",\n\t\"password\": \"te$$$$1\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add user with invalid email",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 500\"] = responseCode.code === 500;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"tests[\"Return message param correct\"] = jsonData[0].param === \"email\";",
									"tests[\"Return message correct\"] = jsonData[0].msg === \"Invalid email\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"first_name\": \"Test\",\n\t\"surname\": \"User\",\n\t\"user_name\": \"test_User2\",\n\t\"email\": \"test@usercom\",\n\t\"password\": \"testuser1\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add user with no surname",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 500\"] = responseCode.code === 500;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"tests[\"Return message param correct\"] = jsonData[0].param === \"surname\";",
									"tests[\"Return message correct\"] = jsonData[0].msg === \"Invalid surname\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"first_name\": \"Test\",\n\t\"surname\": \"\",\n\t\"user_name\": \"test_User2\",\n\t\"email\": \"test@user.com\",\n\t\"password\": \"testuser1\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add user with no first name",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 500\"] = responseCode.code === 500;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"tests[\"Return message param correct\"] = jsonData[0].param === \"first_name\";",
									"tests[\"Return message correct\"] = jsonData[0].msg === \"Invalid first name\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"first_name\": \"\",\n\t\"surname\": \"User\",\n\t\"user_name\": \"test_User2\",\n\t\"email\": \"test@user.com\",\n\t\"password\": \"testuser1\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Login",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var token1 = postman.getResponseCookie(\"uppeat\").value;",
									"postman.setEnvironmentVariable(\"cookie\", token1);"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users/login",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"user_name\": \"test_user1\",\n\t\"password\": \"test1\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Get user",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"var id = postman.getEnvironmentVariable(\"new_user_id\");",
									"",
									"tests[\"User Id value is correct\"] = jsonData.id === id;",
									"tests[\"First name value is correct\"] = jsonData.first_name === \"Test\";",
									"tests[\"Surname value is correct\"] = jsonData.surname === \"User\";",
									"tests[\"Username value is correct\"] = jsonData.user_name === \"test_user1\";",
									"tests[\"Email value is correct\"] = jsonData.email === \"test@user.com\";",
									"tests[\"Full name value is correct\"] = jsonData.full_name === \"Test User\";",
									"tests[\"Locked out is correct\"] = jsonData.isLocked === false;",
									"tests[\"Login attempts is 0\"] = jsonData.loginAttempts === 0;"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users/{{new_user_id}}",
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"user_name\": \"test_user1\",\n\t\"password\": \"test1\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Edit user",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users/{{new_user_id}}",
						"method": "PUT",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"first_name\": \"Test\",\n\t\"surname\": \"UserEdit\",\n\t\"user_name\": \"testUserEdit1\",\n\t\"email\": \"test.edit@user.com\",\n\t\"password\": \"testUser1\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Get edited user",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"var id = postman.getEnvironmentVariable(\"new_user_id\");",
									"",
									"tests[\"User Id value is correct\"] = jsonData.id === id;",
									"tests[\"First name value is correct\"] = jsonData.first_name === \"Test\";",
									"tests[\"Surname value is correct\"] = jsonData.surname === \"UserEdit\";",
									"tests[\"Username value is correct\"] = jsonData.user_name === \"testUserEdit1\";",
									"tests[\"Email value is correct\"] = jsonData.email === \"test.edit@user.com\";",
									"tests[\"Full name value is correct\"] = jsonData.full_name === \"Test UserEdit\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users/{{new_user_id}}",
						"method": "GET",
						"header": [],
						"body": {},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Delete valid user",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"tests[\"Return message correct\"] = responseBody.has(\"User successfully deleted\");"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users/{{new_user_id}}",
						"method": "DELETE",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Delete already deleted user",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 400\"] = responseCode.code === 400;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"tests[\"Return message correct\"] = jsonData.message === \"Could not find user to delete\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users/{{new_user_id}}",
						"method": "DELETE",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Get deleted user",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 404\"] = responseCode.code === 404;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"tests[\"Response message is correct\"] = jsonData.message === \"No user could be found with the given details\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users/{{new_user_id}}",
						"method": "GET",
						"header": [],
						"body": {},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add new user via signup",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"postman.setEnvironmentVariable(\"new_user_id\", jsonData.id);",
									"",
									"tests[\"First name value is correct\"] = jsonData.first_name === \"Test\";",
									"tests[\"Surname value is correct\"] = jsonData.surname === \"User\";",
									"tests[\"Username value is correct\"] = jsonData.user_name === \"test_user2\";",
									"tests[\"Email value is correct\"] = jsonData.email === \"test2@user.com\";",
									"tests[\"Is locked value is correct\"] = jsonData.isLocked === false;",
									"tests[\"Full name value is correct\"] = jsonData.full_name === \"Test User\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users/signup",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"first_name\": \"Test\",\n\t\"surname\": \"User\",\n\t\"user_name\": \"test_User2\",\n\t\"email\": \"test2@user.com\",\n\t\"password\": \"test2\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add existing user via signup",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 400\"] = responseCode.code === 400;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"tests[\"Response message is correct\"] = jsonData.message === \"User name already exists\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users/signup",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"first_name\": \"Test\",\n\t\"surname\": \"User\",\n\t\"user_name\": \"test_user2\",\n\t\"email\": \"test2@user.com\",\n\t\"password\": \"test2\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Delete signed up user",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"tests[\"Return message correct\"] = responseBody.has(\"User successfully deleted\");"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users/{{new_user_id}}",
						"method": "DELETE",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"first_name\": \"Test\",\n\t\"surname\": \"User\",\n\t\"user_name\": \"test_User2\",\n\t\"email\": \"test2@user.com\",\n\t\"password\": \"test2\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add new user for login",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"postman.setEnvironmentVariable(\"new_user_id\", jsonData.id);",
									"",
									"tests[\"First name value is correct\"] = jsonData.first_name === \"Test\";",
									"tests[\"Surname value is correct\"] = jsonData.surname === \"User\";",
									"tests[\"Username value is correct\"] = jsonData.user_name === \"test_user3\";",
									"tests[\"Email value is correct\"] = jsonData.email === \"test3@user.com\";",
									"tests[\"Is locked value is correct\"] = jsonData.isLocked === false;",
									"tests[\"Full name value is correct\"] = jsonData.full_name === \"Test User\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"first_name\": \"Test\",\n\t\"surname\": \"User\",\n\t\"user_name\": \"test_User3\",\n\t\"email\": \"test3@user.com\",\n\t\"password\": \"test3\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Login",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var token1 = postman.getResponseCookie(\"uppeat\").value;",
									"postman.setEnvironmentVariable(\"cookie\", token1);"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users/login",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"user_name\": \"test_user3\",\n\t\"password\": \"test3\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Logout",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"tests[\"Response message is correct\"] = responseBody.has(\"User logged out\");"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users/logout",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"user_name\": \"test_user3\",\n\t\"password\": \"test3\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Login to delete",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var token1 = postman.getResponseCookie(\"uppeat\").value;",
									"postman.setEnvironmentVariable(\"cookie\", token1);"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users/login",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"user_name\": \"test_user3\",\n\t\"password\": \"test3\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Delete login/logout user",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"tests[\"Return message correct\"] = responseBody.has(\"User successfully deleted\");"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users/{{new_user_id}}",
						"method": "DELETE",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"description": ""
					},
					"response": []
				}
			]
		},
		{
			"name": "Whiskeys",
			"description": "",
			"item": [
				{
					"name": "Get all whiskeys",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Whiskeys",
						"method": "GET",
						"header": [],
						"body": {},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add whiskey without distillery",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 500\"] = responseCode.code === 500;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Check error parameter is correct\"] = jsonData[0].param === \"distillery_id\";",
									"tests[\"Check error message is correct\"] = jsonData[0].msg === \"Missing distillery id\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Whiskeys",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"testWhiskey\",\n\t\"abv\": 5,\n\t\"type\": \"grain\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add whiskey with invalid type",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 500\"] = responseCode.code === 500;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Check error param is correct\"] = jsonData[0].param === \"type\";",
									"tests[\"Check error message is correct\"] = jsonData[0].msg === \"Invalid type\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Whiskeys",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"testWhiskey\",\n\t\"abv\": 5,\n\t\"type\": \"test\",\n\t\"distillery_id\": \"{{new_distillery_id}}\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add whiskey without type",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 500\"] = responseCode.code === 500;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Check error param is correct\"] = jsonData[0].param === \"type\";",
									"tests[\"Check error message is correct\"] = jsonData[0].msg === \"Missing type\";",
									"",
									"tests[\"Check error param two is correct\"] = jsonData[1].param === \"type\";",
									"tests[\"Check error message two is correct\"] = jsonData[1].msg === \"Invalid type\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Whiskeys",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"testWhiskey\",\n\t\"abv\": 5,\n\t\"type\": \"\",\n\t\"distillery_id\": \"{{new_distillery_id}}\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add whiskey without abv",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 500\"] = responseCode.code === 500;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Check error param is correct\"] = jsonData[0].param === \"abv\";",
									"tests[\"Check error message is correct\"] = jsonData[0].msg === \"Missing abv\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Whiskeys",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"testWhiskey\",\n\t\"abv\": \"\",\n\t\"type\": \"corn\",\n\t\"distillery_id\": \"{{new_distillery_id}}\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add whiskey without name",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 500\"] = responseCode.code === 500;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Check error param is correct\"] = jsonData[0].param === \"name\";",
									"tests[\"Check error message is correct\"] = jsonData[0].msg === \"Missing name\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Whiskeys",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"\",\n\t\"abv\": 5,\n\t\"type\": \"corn\",\n\t\"distillery_id\": \"{{new_distillery_id}}\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add valid whiskey",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"postman.setEnvironmentVariable(\"new_whiskey_id\", jsonData._id);",
									"",
									"var distilleryId = postman.getEnvironmentVariable(\"new_distillery_id\");",
									"",
									"tests[\"Check name is correct\"] = jsonData.name === \"testWhiskey\";",
									"tests[\"Check abv is correct\"] = jsonData.abv === 5;",
									"tests[\"Check type is correct\"] = jsonData.type === \"corn\";",
									"tests[\"Check distillery id is correct\"] = jsonData.distillery_id[0] === distilleryId;"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Whiskeys",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"testWhiskey\",\n\t\"abv\": 5,\n\t\"type\": \"corn\",\n\t\"distillery_id\": \"{{new_distillery_id}}\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add duplicate whiskey",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 400\"] = responseCode.code === 400;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Response is correct\"] = jsonData.message === \"Whiskey name already exists\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Whiskeys",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"testWhiskey\",\n\t\"abv\": 7,\n\t\"type\": \"grain\",\n\t\"distillery_id\": \"{{new_distillery_id}}\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Get whiskey",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"var id = postman.getEnvironmentVariable(\"new_whiskey_id\");",
									"var distilleryId = postman.getEnvironmentVariable(\"new_distillery_id\");",
									"",
									"tests[\"Check id is correct\"] = jsonData._id === id;",
									"tests[\"Check name is correct\"] = jsonData.name === \"testWhiskey\";",
									"tests[\"Check abv is correct\"] = jsonData.abv === 5;",
									"tests[\"Check type is correct\"] = jsonData.type === \"corn\";",
									"tests[\"Check distillery id is correct\"] = jsonData.distillery_id[0] === distilleryId;"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Whiskeys/{{new_whiskey_id}}",
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"testWhiskey\",\n\t\"abv\": 7,\n\t\"type\": \"grain\",\n\t\"distillery_id\": \"{{new_distillery_id}}\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Get whiskeys for distillery",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"var id = postman.getEnvironmentVariable(\"new_whiskey_id\");",
									"var distilleryId = postman.getEnvironmentVariable(\"new_distillery_id\");",
									"",
									"tests[\"Check id is correct\"] = jsonData[0]._id === id;",
									"tests[\"Check name is correct\"] = jsonData[0].name === \"testWhiskey\";",
									"tests[\"Check abv is correct\"] = jsonData[0].abv === 5;",
									"tests[\"Check type is correct\"] = jsonData[0].type === \"corn\";",
									"tests[\"Check distillery id is correct\"] = jsonData[0].distillery_id[0] === distilleryId;"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Distilleries/{{new_distillery_id}}/Whiskeys",
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"testWhiskey\",\n\t\"abv\": 7,\n\t\"type\": \"grain\",\n\t\"distillery_id\": \"{{new_distillery_id}}\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Edit whiskey with duplicate name",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 400\"] = responseCode.code === 400;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Response is correct\"] = jsonData.message === \"Whiskey name already exists\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Whiskeys/{{new_whiskey_id}}",
						"method": "PUT",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"testWhiskey\",\n\t\"abv\": 10,\n\t\"type\": \"single pot\",\n\t\"distillery_id\": \"{{new_distillery_id}}\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Edit whiskey",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"var id = postman.getEnvironmentVariable(\"new_whiskey_id\");",
									"var distilleryId = postman.getEnvironmentVariable(\"new_distillery_id\");",
									"",
									"tests[\"Check id is correct\"] = jsonData._id === id;",
									"tests[\"Check name is correct\"] = jsonData.name === \"testWhiskeyEdit\";",
									"tests[\"Check abv is correct\"] = jsonData.abv === 10;",
									"tests[\"Check type is correct\"] = jsonData.type === \"single pot\";",
									"tests[\"Check distillery id is correct\"] = jsonData.distillery_id[0] === distilleryId;"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Whiskeys/{{new_whiskey_id}}",
						"method": "PUT",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"testWhiskeyEdit\",\n\t\"abv\": 10,\n\t\"type\": \"single pot\",\n\t\"distillery_id\": \"{{new_distillery_id}}\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Delete distillery for whiskey",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 400\"] = responseCode.code === 400;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Distilleries/{{new_distillery_id}}",
						"method": "DELETE",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Get edited whiskey",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"var id = postman.getEnvironmentVariable(\"new_whiskey_id\");",
									"var distilleryId = postman.getEnvironmentVariable(\"new_distillery_id\");",
									"",
									"tests[\"Check id is correct\"] = jsonData._id === id;",
									"tests[\"Check name is correct\"] = jsonData.name === \"testWhiskeyEdit\";",
									"tests[\"Check abv is correct\"] = jsonData.abv === 10;",
									"tests[\"Check type is correct\"] = jsonData.type === \"single pot\";",
									"tests[\"Check distillery id is correct\"] = jsonData.distillery_id[0] === distilleryId;"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Whiskeys/{{new_whiskey_id}}",
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"testWhiskeyEdit\",\n\t\"abv\": 10,\n\t\"type\": \"single pot\",\n\t\"distillery_id\": \"{{new_distillery_id}}\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Delete whiskey",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"tests[\"Check response is correct\"] = responseBody.has(\"Whiskey successfully deleted\");"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Whiskeys/{{new_whiskey_id}}",
						"method": "DELETE",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Delete deleted whiskey",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 400\"] = responseCode.code === 400;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Response is correct\"] = jsonData.message === \"Could not find whiskey to delete\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Whiskeys/{{new_whiskey_id}}",
						"method": "DELETE",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Get deleted whiskey",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 404\"] = responseCode.code === 404;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Response is correct\"] = jsonData.message === \"No whiskey could be found with the given details\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Whiskeys/{{new_whiskey_id}}",
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"description": ""
					},
					"response": []
				}
			]
		},
		{
			"name": "Distilleries",
			"description": "",
			"item": [
				{
					"name": "Get all distilleries",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Distilleries",
						"method": "GET",
						"header": [],
						"body": {},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add distillery without name",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 500\"] = responseCode.code === 500;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Check error parameter is correct\"] = jsonData[0].param === \"name\";",
									"tests[\"Check error message is correct\"] = jsonData[0].msg === \"Missing name\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Distilleries",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add distillery",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"postman.setEnvironmentVariable(\"new_distillery_id\", jsonData._id);",
									"",
									"tests[\"Check name is correct\"] = jsonData.name === \"testDistillery\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Distilleries",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"testDistillery\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add duplicate distillery",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 400\"] = responseCode.code === 400;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Check response is correct\"] = jsonData.message === \"Distillery name already exists\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Distilleries",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"testDistillery\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Get distillery",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"var id = postman.getEnvironmentVariable(\"new_distillery_id\");",
									"",
									"tests[\"Check id is correct\"] = jsonData._id === id;",
									"tests[\"Check name is correct\"] = jsonData.name === \"testDistillery\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Distilleries/{{new_distillery_id}}",
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"testDistillery\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Edit distillery with duplicate name",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 400\"] = responseCode.code === 400;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Check response is correct\"] = jsonData.message === \"Distillery name already exists\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Distilleries/{{new_distillery_id}}",
						"method": "PUT",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"testDistillery\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Edit distillery",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Check name is correct\"] = jsonData.name === \"testDistilleryEdit\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Distilleries/{{new_distillery_id}}",
						"method": "PUT",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"testDistilleryEdit\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Get edited distillery",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"var id = postman.getEnvironmentVariable(\"new_distillery_id\");",
									"",
									"tests[\"Check id is correct\"] = jsonData._id === id;",
									"tests[\"Check name is correct\"] = jsonData.name === \"testDistilleryEdit\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Distilleries/{{new_distillery_id}}",
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"testDistilleryEdit\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Delete distillery",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"tests[\"Check response is correct\"] = responseBody.has(\"Distillery successfully deleted\");"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Distilleries/{{new_distillery_id}}",
						"method": "DELETE",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Delete deleted distillery",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 400\"] = responseCode.code === 400;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Check response is correct\"] = jsonData.message === \"Could not find distillery to delete\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Distilleries/{{new_distillery_id}}",
						"method": "DELETE",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Get deleted distillery",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 404\"] = responseCode.code === 404;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Check response is correct\"] = jsonData.message === \"No distillery could be found with the given details\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Distilleries/{{new_distillery_id}}",
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"testDistilleryEdit\"\n}"
						},
						"description": ""
					},
					"response": []
				}
			]
		},
		{
			"name": "Locations",
			"description": "",
			"item": [
				{
					"name": "Get all locations",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Locations",
						"method": "GET",
						"header": [],
						"body": {},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add location without name",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 500\"] = responseCode.code === 500;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Check error parameter is correct\"] = jsonData[0].param === \"name\";",
									"tests[\"Check error message is correct\"] = jsonData[0].msg === \"Missing name\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Locations",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add location",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"postman.setEnvironmentVariable(\"new_location_id\", jsonData._id);",
									"",
									"tests[\"Check name is correct\"] = jsonData.name === \"testLocation\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Locations",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"testLocation\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add duplicate location",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 400\"] = responseCode.code === 400;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Check response is correct\"] = jsonData.message === \"Location name already exists\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Locations",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"testLocation\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Get location",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"var id = postman.getEnvironmentVariable(\"new_location_id\");",
									"",
									"tests[\"Check id is correct\"] = jsonData._id === id;",
									"tests[\"Check name is correct\"] = jsonData.name === \"testLocation\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Locations/{{new_location_id}}",
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"testDistillery\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Edit location with duplicate name",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 400\"] = responseCode.code === 400;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Check response is correct\"] = jsonData.message === \"Location name already exists\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Locations/{{new_location_id}}",
						"method": "PUT",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"testLocation\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Edit location",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Check name is correct\"] = jsonData.name === \"testLocationEdit\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Locations/{{new_location_id}}",
						"method": "PUT",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"testLocationEdit\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Get edited location",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"var id = postman.getEnvironmentVariable(\"new_location_id\");",
									"",
									"tests[\"Check id is correct\"] = jsonData._id === id;",
									"tests[\"Check name is correct\"] = jsonData.name === \"testLocationEdit\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Locations/{{new_location_id}}",
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"testDistilleryEdit\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Delete location",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"tests[\"Check response is correct\"] = responseBody.has(\"Location successfully deleted\");"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Locations/{{new_location_id}}",
						"method": "DELETE",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Delete deleted location",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 400\"] = responseCode.code === 400;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Check response is correct\"] = jsonData.message === \"Could not find location to delete\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Locations/{{new_location_id}}",
						"method": "DELETE",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Get deleted distillery",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 404\"] = responseCode.code === 404;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Check response is correct\"] = jsonData.message === \"No location could be found with the given details\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Locations/{{new_location_id}}",
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"testDistilleryEdit\"\n}"
						},
						"description": ""
					},
					"response": []
				}
			]
		},
		{
			"name": "Ratings",
			"description": "",
			"item": [
				{
					"name": "Get all ratings",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Ratings",
						"method": "GET",
						"header": [],
						"body": {},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add rating with invalid options",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 500\"] = responseCode.code === 500;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Check error parameter is correct\"] = jsonData[0].param === \"rating\";",
									"tests[\"Check error message is correct\"] = jsonData[0].msg === \"Must be an integer between 0 and 10\";",
									"",
									"tests[\"Check error parameter two is correct\"] = jsonData[1].param === \"whiskey_id\";",
									"tests[\"Check error message two is correct\"] = jsonData[1].msg === \"Missing whiskey id\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Ratings",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"rating\": 11,\n\t\"whiskey_id\": \"\",\n\t\"created_by\": \"\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add distillery for rating",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"postman.setEnvironmentVariable(\"new_distillery_id\", jsonData._id);",
									"",
									"tests[\"Check name is correct\"] = jsonData.name === \"ratingDistillery\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Distilleries",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"ratingDistillery\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add whiskey for rating",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"postman.setEnvironmentVariable(\"new_whiskey_id\", jsonData._id);",
									"",
									"var distilleryId = postman.getEnvironmentVariable(\"new_distillery_id\");",
									"",
									"tests[\"Check name is correct\"] = jsonData.name === \"ratingWhiskey\";",
									"tests[\"Check abv is correct\"] = jsonData.abv === 15;",
									"tests[\"Check type is correct\"] = jsonData.type === \"rice\";",
									"tests[\"Check distillery id is correct\"] = jsonData.distillery_id[0] === distilleryId;"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Whiskeys",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"ratingWhiskey\",\n\t\"abv\": 15,\n\t\"type\": \"rice\",\n\t\"distillery_id\": \"{{new_distillery_id}}\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add whiskey two for rating",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"postman.setEnvironmentVariable(\"second_whiskey_id\", jsonData._id);",
									"",
									"var distilleryId = postman.getEnvironmentVariable(\"new_distillery_id\");",
									"",
									"tests[\"Check name is correct\"] = jsonData.name === \"ratingWhiskeyTwo\";",
									"tests[\"Check abv is correct\"] = jsonData.abv === 15;",
									"tests[\"Check type is correct\"] = jsonData.type === \"rice\";",
									"tests[\"Check distillery id is correct\"] = jsonData.distillery_id[0] === distilleryId;"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Whiskeys",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"ratingWhiskeyTwo\",\n\t\"abv\": 15,\n\t\"type\": \"rice\",\n\t\"distillery_id\": \"{{new_distillery_id}}\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add user for rating",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"postman.setEnvironmentVariable(\"new_user_id\", jsonData.id);",
									"",
									"tests[\"First name value is correct\"] = jsonData.first_name === \"Rating\";",
									"tests[\"Surname value is correct\"] = jsonData.surname === \"User\";",
									"tests[\"Username value is correct\"] = jsonData.user_name === \"ratinguser\";",
									"tests[\"Email value is correct\"] = jsonData.email === \"rating@user.com\";",
									"tests[\"Is locked value is correct\"] = jsonData.isLocked === false;",
									"tests[\"Full name value is correct\"] = jsonData.full_name === \"Rating User\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"first_name\": \"Rating\",\n\t\"surname\": \"User\",\n\t\"user_name\": \"ratingUser\",\n\t\"email\": \"rating@user.com\",\n\t\"password\": \"rating1\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add valid rating before login",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 403\"] = responseCode.code === 403;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Response is correct\"] = jsonData.message === \"User must be logged in to access this resource\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Ratings",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"rating\": 5,\n\t\"whiskey_id\": \"{{new_whiskey_id}}\",\n\t\"created_by\": \"{{new_user_id}}\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Login as rating user",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var token1 = postman.getResponseCookie(\"uppeat\").value;",
									"postman.setEnvironmentVariable(\"cookie\", token1);"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users/login",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"user_name\": \"ratinguser\",\n\t\"password\": \"rating1\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add valid rating",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"postman.setEnvironmentVariable(\"new_rating_id\", jsonData._id);",
									"",
									"var whiskeyId = postman.getEnvironmentVariable(\"new_whiskey_id\");",
									"var userId = postman.getEnvironmentVariable(\"new_user_id\");",
									"",
									"tests[\"Check rating is correct\"] = jsonData.rating === 5;",
									"tests[\"Check whiskey id is correct\"] = jsonData.whiskey_id === whiskeyId;",
									"tests[\"Check user id is correct\"] = jsonData.created_by === userId;"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Ratings",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"rating\": 5,\n\t\"whiskey_id\": \"{{new_whiskey_id}}\",\n\t\"created_by\": \"{{new_user_id}}\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add immediate duplicate rating",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 400\"] = responseCode.code === 400;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Response is correct\"] = jsonData.message === \"Duplicate rating, wait one minute and try again\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Ratings",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"rating\": 5,\n\t\"whiskey_id\": \"{{new_whiskey_id}}\",\n\t\"created_by\": \"{{new_user_id}}\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add second rating",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"postman.setEnvironmentVariable(\"second_rating_id\", jsonData._id);",
									"",
									"var whiskeyId = postman.getEnvironmentVariable(\"second_whiskey_id\");",
									"var userId = postman.getEnvironmentVariable(\"new_user_id\");",
									"",
									"tests[\"Check rating is correct\"] = jsonData.rating === 5;",
									"tests[\"Check whiskey id is correct\"] = jsonData.whiskey_id === whiskeyId;",
									"tests[\"Check user id is correct\"] = jsonData.created_by === userId;"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Ratings",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"rating\": 5,\n\t\"whiskey_id\": \"{{second_whiskey_id}}\",\n\t\"created_by\": \"{{new_user_id}}\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Get rating",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"var id = postman.getEnvironmentVariable(\"new_rating_id\");",
									"var whiskeyId = postman.getEnvironmentVariable(\"new_whiskey_id\");",
									"var userId = postman.getEnvironmentVariable(\"new_user_id\");",
									"",
									"tests[\"Check id is correct\"] = jsonData._id === id;",
									"tests[\"Check rating is correct\"] = jsonData.rating === 5;",
									"tests[\"Check whiskey id is correct\"] = jsonData.whiskey_id === whiskeyId;",
									"tests[\"Check user id is correct\"] = jsonData.created_by === userId;"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Ratings/{{new_rating_id}}",
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"testWhiskey\",\n\t\"abv\": 7,\n\t\"type\": \"grain\",\n\t\"distillery_id\": \"{{new_distillery_id}}\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Get ratings for whiskey",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"var whiskeyId = postman.getEnvironmentVariable(\"new_whiskey_id\");",
									"",
									"tests[\"Check just one record returned\"] = jsonData.length === 1;",
									"tests[\"Check correct record returned\"] = jsonData[0].whiskey_id === whiskeyId;"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Whiskeys/{{new_whiskey_id}}/Ratings",
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"testWhiskey\",\n\t\"abv\": 7,\n\t\"type\": \"grain\",\n\t\"distillery_id\": \"{{new_distillery_id}}\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Logout",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"tests[\"Response message is correct\"] = responseBody.has(\"User logged out\");"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users/logout",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"user_name\": \"ratinguser\",\n\t\"password\": \"rating1\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Edit rating before login",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 403\"] = responseCode.code === 403;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Response is correct\"] = jsonData.message === \"User must be logged in to access this resource\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Ratings/{{new_rating_id}}",
						"method": "PUT",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"rating\": 6,\n\t\"whiskey_id\": \"{{new_whiskey_id}}\",\n\t\"created_by\": \"{{new_user_id}}\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Delete rating before login",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 403\"] = responseCode.code === 403;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Response is correct\"] = jsonData.message === \"User must be logged in to access this resource\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Ratings/{{new_rating_id}}",
						"method": "DELETE",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Add new user for rating via signup",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"postman.setEnvironmentVariable(\"second_user_id\", jsonData.id);",
									"",
									"tests[\"First name value is correct\"] = jsonData.first_name === \"Rating\";",
									"tests[\"Surname value is correct\"] = jsonData.surname === \"User\";",
									"tests[\"Username value is correct\"] = jsonData.user_name === \"rating_user2\";",
									"tests[\"Email value is correct\"] = jsonData.email === \"rating2@user.com\";",
									"tests[\"Is locked value is correct\"] = jsonData.isLocked === false;",
									"tests[\"Full name value is correct\"] = jsonData.full_name === \"Rating User\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users/signup",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"first_name\": \"Rating\",\n\t\"surname\": \"User\",\n\t\"user_name\": \"rating_User2\",\n\t\"email\": \"rating2@user.com\",\n\t\"password\": \"rating2\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Edit rating with incorrect user",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 403\"] = responseCode.code === 403;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Response is correct\"] = jsonData.message === \"Logged in user (rating_user2) is not authorised to access this resource\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Ratings/{{new_rating_id}}",
						"method": "PUT",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"rating\": 6,\n\t\"whiskey_id\": \"{{new_whiskey_id}}\",\n\t\"created_by\": \"{{new_user_id}}\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Delete rating with incorrect user",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 403\"] = responseCode.code === 403;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Response is correct\"] = jsonData.message === \"Logged in user (rating_user2) is not authorised to access this resource\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Ratings/{{new_rating_id}}",
						"method": "DELETE",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Login as rating user",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var token1 = postman.getResponseCookie(\"uppeat\").value;",
									"postman.setEnvironmentVariable(\"cookie\", token1);"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users/login",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"user_name\": \"ratinguser\",\n\t\"password\": \"rating1\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Edit rating",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"var id = postman.getEnvironmentVariable(\"new_rating_id\");",
									"var whiskeyId = postman.getEnvironmentVariable(\"new_whiskey_id\");",
									"var userId = postman.getEnvironmentVariable(\"new_user_id\");",
									"",
									"tests[\"Check id is correct\"] = jsonData._id === id;",
									"tests[\"Check rating is correct\"] = jsonData.rating === 6;",
									"tests[\"Check whiskey id is correct\"] = jsonData.whiskey_id === whiskeyId;",
									"tests[\"Check user id is correct\"] = jsonData.created_by === userId;"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Ratings/{{new_rating_id}}",
						"method": "PUT",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"rating\": 6,\n\t\"whiskey_id\": \"{{new_whiskey_id}}\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Get edited rating",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"var id = postman.getEnvironmentVariable(\"new_rating_id\");",
									"var whiskeyId = postman.getEnvironmentVariable(\"new_whiskey_id\");",
									"var userId = postman.getEnvironmentVariable(\"new_user_id\");",
									"",
									"tests[\"Check id is correct\"] = jsonData._id === id;",
									"tests[\"Check rating is correct\"] = jsonData.rating === 6;",
									"tests[\"Check whiskey id is correct\"] = jsonData.whiskey_id === whiskeyId;",
									"tests[\"Check user id is correct\"] = jsonData.created_by === userId;"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Ratings/{{new_rating_id}}",
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"name\": \"testWhiskey\",\n\t\"abv\": 7,\n\t\"type\": \"grain\",\n\t\"distillery_id\": \"{{new_distillery_id}}\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Delete rating",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"tests[\"Check response is correct\"] = responseBody.has(\"Rating successfully deleted\");"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Ratings/{{new_rating_id}}",
						"method": "DELETE",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Delete rating two",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"tests[\"Check response is correct\"] = responseBody.has(\"Rating successfully deleted\");"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Ratings/{{second_rating_id}}",
						"method": "DELETE",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Delete deleted rating",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 400\"] = responseCode.code === 400;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Response is correct\"] = jsonData.message === \"Could not find rating to delete\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Ratings/{{new_rating_id}}",
						"method": "DELETE",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Get deleted rating",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 404\"] = responseCode.code === 404;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var jsonData = JSON.parse(responseBody);",
									"",
									"tests[\"Response is correct\"] = jsonData.message === \"No rating could be found with the given details\";"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Ratings/{{new_rating_id}}",
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Delete rating whiskey",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"tests[\"Check response is correct\"] = responseBody.has(\"Whiskey successfully deleted\");"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Whiskeys/{{new_whiskey_id}}",
						"method": "DELETE",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Delete rating whiskey two",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"tests[\"Check response is correct\"] = responseBody.has(\"Whiskey successfully deleted\");"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Whiskeys/{{second_whiskey_id}}",
						"method": "DELETE",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Delete rating distillery",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"tests[\"Check response is correct\"] = responseBody.has(\"Distillery successfully deleted\");"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Distilleries/{{new_distillery_id}}",
						"method": "DELETE",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Delete rating user",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"tests[\"Check response is correct\"] = responseBody.has(\"User successfully deleted\");"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users/{{new_user_id}}",
						"method": "DELETE",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Login as rating user two",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"",
									"var token1 = postman.getResponseCookie(\"uppeat\").value;",
									"postman.setEnvironmentVariable(\"cookie\", token1);"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users/login",
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"user_name\": \"rating_user2\",\n\t\"password\": \"rating2\"\n}"
						},
						"description": ""
					},
					"response": []
				},
				{
					"name": "Delete rating user two",
					"event": [
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"exec": [
									"tests[\"Response code is 200\"] = responseCode.code === 200;",
									"tests[\"Content-Type is present\"] = postman.getResponseHeader(\"Content-Type\");",
									"tests[\"Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\").includes(\"application/json\");",
									"tests[\"Check response is correct\"] = responseBody.has(\"User successfully deleted\");"
								]
							}
						}
					],
					"request": {
						"url": "{{base_url}}/Users/{{second_user_id}}",
						"method": "DELETE",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": ""
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"description": ""
					},
					"response": []
				}
			]
		}
	]
}