-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from CS222-UIUC/minh/fix_prod_tests
Fix backend production tests and add support for deleting reviews
- Loading branch information
Showing
9 changed files
with
168 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,92 +36,92 @@ CREATE TABLE Reviews ( | |
); | ||
|
||
-- TEST | ||
INSERT INTO Users (username, password, email, phone, apt_id) | ||
VALUES ('Zongxian', '12345abcde', '[email protected]', '1234567890', 1); | ||
INSERT INTO Users (user_id, username, password, email, phone, apt_id) | ||
VALUES (1, 'Zongxian', '12345abcde', '[email protected]', '1234567890', 1); | ||
|
||
INSERT INTO Users (username, password, email, phone, apt_id) | ||
VALUES ('MonteCarlo', 'qwert#6767', '[email protected]', '9876543210', 2); | ||
INSERT INTO Users (user_id, username, password, email, phone, apt_id) | ||
VALUES (2, 'MonteCarlo', 'qwert#6767', '[email protected]', '9876543210', 2); | ||
|
||
INSERT INTO Users (username, password, email, phone, apt_id) | ||
VALUES ('Evans', 'asd', 'Evans.com', '9876543210', 3); | ||
INSERT INTO Users (user_id, username, password, email, phone, apt_id) | ||
VALUES (3, 'Evans', 'asd', 'Evans.com', '9876543210', 3); | ||
|
||
INSERT INTO Users (username, password, email, phone, apt_id) | ||
VALUES ('Xi', 'abcdefg', '[email protected]', '9876543210', 4); | ||
INSERT INTO Users (user_id, username, password, email, phone, apt_id) | ||
VALUES (4, 'Xi', 'abcdefg', '[email protected]', '9876543210', 4); | ||
|
||
INSERT INTO Users (username, password, email, phone, apt_id) | ||
VALUES ('Waterbottle', 'hello123', 'Minh.com', '9876543210', 5); | ||
INSERT INTO Users (user_id, username, password, email, phone, apt_id) | ||
VALUES (5, 'Waterbottle', 'hello123', 'Minh.com', '9876543210', 5); | ||
|
||
INSERT INTO Users (username, password, email, phone, apt_id) | ||
VALUES ('Pencil', 'qw??DASFD@$!@767', '[email protected]', '9876543210', 6); | ||
INSERT INTO Users (user_id, username, password, email, phone, apt_id) | ||
VALUES (6, 'Pencil', 'qw??DASFD@$!@767', '[email protected]', '9876543210', 6); | ||
|
||
INSERT INTO Users (username, password, email, phone, apt_id) | ||
VALUES ('Green alien', '1234324324fgrerw?$#@%?', 'Minh.com', '9876543210', 7); | ||
INSERT INTO Users (user_id, username, password, email, phone, apt_id) | ||
VALUES (7, 'Green alien', '1234324324fgrerw?$#@%?', 'Minh.com', '9876543210', 7); | ||
|
||
INSERT INTO Users (username, password, email, phone, apt_id) | ||
VALUES ('Jefferson', '0q4043jtqwt?$#T', '[email protected]', '123456789', 8); | ||
INSERT INTO Users (user_id, username, password, email, phone, apt_id) | ||
VALUES (8, 'Jefferson', '0q4043jtqwt?$#T', '[email protected]', '123456789', 8); | ||
|
||
INSERT INTO Users (username, password, email, phone, apt_id) | ||
VALUES ('Timothy', 'asdfsdf', 'Minh.com', '9876543210', 2); | ||
INSERT INTO Users (user_id, username, password, email, phone, apt_id) | ||
VALUES (9, 'Timothy', 'asdfsdf', 'Minh.com', '9876543210', 2); | ||
|
||
INSERT INTO Apartments (apt_name, apt_address, price_min, price_max, link) | ||
VALUES ('The Dean Campustown', '708 S 6th St Champaign, IL 61820', 860, 1900, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/The-Dean-Campustown-Apartments-ttrtct8'); | ||
INSERT INTO Apartments (apt_id, apt_name, apt_address, price_min, price_max, link) | ||
VALUES (1, 'The Dean Campustown', '708 S 6th St Champaign, IL 61820', 860, 1900, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/The-Dean-Campustown-Apartments-ttrtct8'); | ||
|
||
INSERT INTO Apartments (apt_name, apt_address, price_min, price_max, link) | ||
VALUES ('Seven07 Apartments', '707 S 4th St Champaign, IL 61820', 856, 1750, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/Seven07-Apartments-75ckgzx'); | ||
INSERT INTO Apartments (apt_id, apt_name, apt_address, price_min, price_max, link) | ||
VALUES (2, 'Seven07 Apartments', '707 S 4th St Champaign, IL 61820', 856, 1750, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/Seven07-Apartments-75ckgzx'); | ||
|
||
INSERT INTO Apartments (apt_name, apt_address, price_min, price_max, link) | ||
VALUES ('Maywood Apartments', '707 Left St Urbana, IL 61801', 300, 900, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/The-Dean-Campustown-Apartments-ttrtct8'); | ||
INSERT INTO Apartments (apt_id, apt_name, apt_address, price_min, price_max, link) | ||
VALUES (3, 'Maywood Apartments', '707 Left St Urbana, IL 61801', 300, 900, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/The-Dean-Campustown-Apartments-ttrtct8'); | ||
|
||
INSERT INTO Apartments (apt_name, apt_address, price_min, price_max, link) | ||
VALUES ('Champaign Park', '2106 W White St Champaign, IL 61820', 856, 1750, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/Seven07-Apartments-75ckgzx'); | ||
INSERT INTO Apartments (apt_id, apt_name, apt_address, price_min, price_max, link) | ||
VALUES (4, 'Champaign Park', '2106 W White St Champaign, IL 61820', 856, 1750, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/Seven07-Apartments-75ckgzx'); | ||
|
||
INSERT INTO Apartments (apt_name, apt_address, price_min, price_max, link) | ||
VALUES ('Capstone Quarters', '708 S 6th St Champaign, IL 61820', 860, 1900, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/The-Dean-Campustown-Apartments-ttrtct8'); | ||
INSERT INTO Apartments (apt_id, apt_name, apt_address, price_min, price_max, link) | ||
VALUES (5, 'Capstone Quarters', '708 S 6th St Champaign, IL 61820', 860, 1900, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/The-Dean-Campustown-Apartments-ttrtct8'); | ||
|
||
INSERT INTO Apartments (apt_name, apt_address, price_min, price_max, link) | ||
VALUES ('Legacy202', '1234 Sunshine Ct Champaign, IL 61820', 856, 1750, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/Seven07-Apartments-75ckgzx'); | ||
INSERT INTO Apartments (apt_id, apt_name, apt_address, price_min, price_max, link) | ||
VALUES (6, 'Legacy202', '1234 Sunshine Ct Champaign, IL 61820', 856, 1750, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/Seven07-Apartments-75ckgzx'); | ||
|
||
INSERT INTO Apartments (apt_name, apt_address, price_min, price_max, link) | ||
VALUES ('Cool Apartments', '689 N 1st St Champaign, IL 61820', 435, 54635, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/The-Dean-Campustown-Apartments-ttrtct8'); | ||
INSERT INTO Apartments (apt_id, apt_name, apt_address, price_min, price_max, link) | ||
VALUES (7, 'Cool Apartments', '689 N 1st St Champaign, IL 61820', 435, 54635, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/The-Dean-Campustown-Apartments-ttrtct8'); | ||
|
||
INSERT INTO Apartments (apt_name, apt_address, price_min, price_max, link) | ||
VALUES ('Luxury Student Housing', '710 S 4th St Champaign, IL 61820', 233, 444, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/Seven07-Apartments-75ckgzx'); | ||
INSERT INTO Apartments (apt_id, apt_name, apt_address, price_min, price_max, link) | ||
VALUES (8, 'Luxury Student Housing', '710 S 4th St Champaign, IL 61820', 233, 444, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/Seven07-Apartments-75ckgzx'); | ||
|
||
INSERT INTO Apartments (apt_name, apt_address, price_min, price_max, link) | ||
VALUES ('House', '708 S 6th St Champaign, IL 61820', 5, 45, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/The-Dean-Campustown-Apartments-ttrtct8'); | ||
INSERT INTO Apartments (apt_id, apt_name, apt_address, price_min, price_max, link) | ||
VALUES (9, 'House', '708 S 6th St Champaign, IL 61820', 5, 45, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/The-Dean-Campustown-Apartments-ttrtct8'); | ||
|
||
INSERT INTO Apartments (apt_name, apt_address, price_min, price_max, link) | ||
VALUES ('Fields South', '3301 Fields South St Champaign, IL 61820', 345, 4536, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/Seven07-Apartments-75ckgzx'); | ||
INSERT INTO Apartments (apt_id, apt_name, apt_address, price_min, price_max, link) | ||
VALUES (10, 'Fields South', '3301 Fields South St Champaign, IL 61820', 345, 4536, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/Seven07-Apartments-75ckgzx'); | ||
|
||
INSERT INTO Apartments (apt_name, apt_address, price_min, price_max, link) | ||
VALUES ('An Apartment', '1600 W Bradley St Champaign, IL 61820', 21, 346346, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/The-Dean-Campustown-Apartments-ttrtct8'); | ||
INSERT INTO Apartments (apt_id, apt_name, apt_address, price_min, price_max, link) | ||
VALUES (11, 'An Apartment', '1600 W Bradley St Champaign, IL 61820', 21, 346346, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/The-Dean-Campustown-Apartments-ttrtct8'); | ||
|
||
INSERT INTO Apartments (apt_name, apt_address, price_min, price_max, link) | ||
VALUES ('Skyline Tower', '519 E Green St Champaign, IL 61820', 2323, 12345, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/Seven07-Apartments-75ckgzx'); | ||
INSERT INTO Apartments (apt_id, apt_name, apt_address, price_min, price_max, link) | ||
VALUES (12, 'Skyline Tower', '519 E Green St Champaign, IL 61820', 2323, 12345, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/Seven07-Apartments-75ckgzx'); | ||
|
||
INSERT INTO Apartments (apt_name, apt_address, price_min, price_max, link) | ||
VALUES ('Baytowne Apartments', '1000 Baytowne Dr Champaign, IL 61820', 345, 555, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/The-Dean-Campustown-Apartments-ttrtct8'); | ||
INSERT INTO Apartments (apt_id, apt_name, apt_address, price_min, price_max, link) | ||
VALUES (13, 'Baytowne Apartments', '1000 Baytowne Dr Champaign, IL 61820', 345, 555, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/The-Dean-Campustown-Apartments-ttrtct8'); | ||
|
||
INSERT INTO Apartments (apt_name, apt_address, price_min, price_max, link) | ||
VALUES ('Fields South', '3301 Fields South St Champaign, IL 61820', 666, 777, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/Seven07-Apartments-75ckgzx'); | ||
INSERT INTO Apartments (apt_id, apt_name, apt_address, price_min, price_max, link) | ||
VALUES (14, 'Fields South', '3301 Fields South St Champaign, IL 61820', 666, 777, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/Seven07-Apartments-75ckgzx'); | ||
|
||
INSERT INTO Apartments (apt_name, apt_address, price_min, price_max, link) | ||
VALUES ('Westgate Apartments', '1600 W Bradley St Champaign, IL 61820', 555, 654, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/The-Dean-Campustown-Apartments-ttrtct8'); | ||
INSERT INTO Apartments (apt_id, apt_name, apt_address, price_min, price_max, link) | ||
VALUES (15, 'Westgate Apartments', '1600 W Bradley St Champaign, IL 61820', 555, 654, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/The-Dean-Campustown-Apartments-ttrtct8'); | ||
|
||
INSERT INTO Apartments (apt_name, apt_address, price_min, price_max, link) | ||
VALUES ('112 Green', '112 E Green St Champaign, IL 61820', 123, 234, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/Seven07-Apartments-75ckgzx'); | ||
INSERT INTO Apartments (apt_id, apt_name, apt_address, price_min, price_max, link) | ||
VALUES (16, '112 Green', '112 E Green St Champaign, IL 61820', 123, 234, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/Seven07-Apartments-75ckgzx'); | ||
|
||
INSERT INTO Apartments (apt_name, apt_address, price_min, price_max, link) | ||
VALUES ('Hunters Pond Apartment Homes', '2717 Hunters Pand Run Champaign, IL 61820', 555, 778, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/The-Dean-Campustown-Apartments-ttrtct8'); | ||
INSERT INTO Apartments (apt_id, apt_name, apt_address, price_min, price_max, link) | ||
VALUES (17, 'Hunters Pond Apartment Homes', '2717 Hunters Pand Run Champaign, IL 61820', 555, 778, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/The-Dean-Campustown-Apartments-ttrtct8'); | ||
|
||
INSERT INTO Apartments (apt_name, apt_address, price_min, price_max, link) | ||
VALUES ('Fields South', '3301 Fields South St Champaign, IL 61820', 998, 999, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/Seven07-Apartments-75ckgzx'); | ||
INSERT INTO Apartments (apt_id, apt_name, apt_address, price_min, price_max, link) | ||
VALUES (18, 'Fields South', '3301 Fields South St Champaign, IL 61820', 998, 999, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/Seven07-Apartments-75ckgzx'); | ||
|
||
INSERT INTO Apartments (apt_name, apt_address, price_min, price_max, link) | ||
VALUES ('Westgate Apartments', '1600 W Bradley St Champaign, IL 61820', 21, 346346, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/The-Dean-Campustown-Apartments-ttrtct8'); | ||
INSERT INTO Apartments (apt_id, apt_name, apt_address, price_min, price_max, link) | ||
VALUES (19, 'Westgate Apartments', '1600 W Bradley St Champaign, IL 61820', 21, 346346, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/The-Dean-Campustown-Apartments-ttrtct8'); | ||
|
||
INSERT INTO Apartments (apt_name, apt_address, price_min, price_max, link) | ||
VALUES ('112 Green', '112 E Green St Champaign, IL 61820', 900, 2314, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/Seven07-Apartments-75ckgzx'); | ||
INSERT INTO Apartments (apt_id, apt_name, apt_address, price_min, price_max, link) | ||
VALUES (20, '112 Green', '112 E Green St Champaign, IL 61820', 900, 2314, 'https://www.apartmentfinder.com/Illinois/Champaign-Apartments/Seven07-Apartments-75ckgzx'); | ||
|
||
INSERT INTO AptPics (apt_id, link) | ||
VALUES (1, 'https://image1.apartmentfinder.com/i2/yI_vOGHFLSjSR7fuXTtN6vEcPux3OoeLbY-pKtkIda8/116/seven07-champaign-il-4-br-4-ba---living-room.jpg'); | ||
|
@@ -211,13 +211,13 @@ INSERT INTO Reviews (apt_id, user_id, date_of_rating, comment, vote) | |
VALUES (9, 9, '2021-09-12', 'Its not an apartment, its a flat.', 1); | ||
|
||
INSERT INTO Reviews (apt_id, user_id, date_of_rating, comment, vote) | ||
VALUES (10, 10, '2021-09-13', 'Be a good person', -1); | ||
VALUES (10, 1, '2021-09-13', 'Be a good person', -1); | ||
|
||
INSERT INTO Reviews (apt_id, user_id, date_of_rating, comment, vote) | ||
VALUES (11, 11, '2021-09-14', 'Hello there lizard', 1); | ||
VALUES (11, 2, '2021-09-14', 'Hello there lizard', 1); | ||
|
||
INSERT INTO Reviews (apt_id, user_id, date_of_rating, comment, vote) | ||
VALUES (12, 12, '2021-09-15', 'Windows are broken, rent is expensive, door doesnt work. Roof falling in. Bank foreclosing it. ABORT', -1); | ||
VALUES (12, 3, '2021-09-15', 'Windows are broken, rent is expensive, door doesnt work. Roof falling in. Bank foreclosing it. ABORT', -1); | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
ef23fbc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report
ef23fbc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report
ef23fbc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report
ef23fbc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report
ef23fbc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report
ef23fbc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report