From be80fe7ee6a9a1926259b17a8cb5158eaa2e66a9 Mon Sep 17 00:00:00 2001 From: d1g1t4ld1n4 Date: Fri, 7 Dec 2018 21:57:05 -0500 Subject: [PATCH 01/10] Update node_tags.yml --- test/fixtures/node_tags.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/fixtures/node_tags.yml b/test/fixtures/node_tags.yml index 3221d8a4e4..9066e51432 100644 --- a/test/fixtures/node_tags.yml +++ b/test/fixtures/node_tags.yml @@ -9,6 +9,12 @@ awesome: uid: 2 nid: 1 date: <%= DateTime.now.to_i %> + +cool: + tid: 2 + uid: 2 + nid: 1 + date: <%= DateTime.now.to_i %> awesome2: tid: 2 From d967727b57cd074b2d7ba3f73b406ea7e8d8fa56 Mon Sep 17 00:00:00 2001 From: d1g1t4ld1n4 Date: Mon, 10 Dec 2018 17:51:55 -0500 Subject: [PATCH 02/10] Update admin_controller_test.rb --- test/functional/admin_controller_test.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/functional/admin_controller_test.rb b/test/functional/admin_controller_test.rb index a637c0f49f..72a0174fcb 100644 --- a/test/functional/admin_controller_test.rb +++ b/test/functional/admin_controller_test.rb @@ -34,6 +34,10 @@ def teardown assert_redirected_to '/profile/' + user.username + '?_=' + Time.now.to_i.to_s end + test 'should make current_user the current user' do + UserSession.create(users(:jeff)) + end + test 'admin should promote user role to moderator' do UserSession.create(users(:jeff)) user = users(:bob) From b8694aa5e5b650d17eeb97e6c5dbef5362b3b736 Mon Sep 17 00:00:00 2001 From: d1g1t4ld1n4 Date: Mon, 10 Dec 2018 17:52:15 -0500 Subject: [PATCH 03/10] Update admin_controller_test.rb --- test/functional/admin_controller_test.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/functional/admin_controller_test.rb b/test/functional/admin_controller_test.rb index 72a0174fcb..a637c0f49f 100644 --- a/test/functional/admin_controller_test.rb +++ b/test/functional/admin_controller_test.rb @@ -34,10 +34,6 @@ def teardown assert_redirected_to '/profile/' + user.username + '?_=' + Time.now.to_i.to_s end - test 'should make current_user the current user' do - UserSession.create(users(:jeff)) - end - test 'admin should promote user role to moderator' do UserSession.create(users(:jeff)) user = users(:bob) From d3023ffc67c6faedf2723a26e953764bd4202267 Mon Sep 17 00:00:00 2001 From: d1g1t4ld1n4 Date: Sat, 15 Dec 2018 22:48:34 -0500 Subject: [PATCH 04/10] Update DATA_MODEL.md --- doc/DATA_MODEL.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/DATA_MODEL.md b/doc/DATA_MODEL.md index 97ef9889c1..f8d46f2ade 100644 --- a/doc/DATA_MODEL.md +++ b/doc/DATA_MODEL.md @@ -72,6 +72,14 @@ They are typically cached for quick loading, and can be inserted anywhere in the Comments belong to Notes via `nid`, and each have an author via `uid`; primary key `cid`. Maps also have comments via `nid`, and Answers may also have comments, via `aid`. +Node `status` -- a property of `comments`, can be: + +* 0: banned +* 1: normal +* 3: draft + +The status for Node is now the same for comment in our Code base except for status = 4 + ### Answers Answers are similar to Comments, but are used in Question-type Notes, and may each have Comments of their own. Primary key `aid`. From f1ef8618fe7e59b45d994c1798dac329354d4f23 Mon Sep 17 00:00:00 2001 From: d1g1t4ld1n4 Date: Sat, 15 Dec 2018 22:54:24 -0500 Subject: [PATCH 05/10] Update DATA_MODEL.md --- doc/DATA_MODEL.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/DATA_MODEL.md b/doc/DATA_MODEL.md index f8d46f2ade..3531fe194f 100644 --- a/doc/DATA_MODEL.md +++ b/doc/DATA_MODEL.md @@ -77,8 +77,9 @@ Node `status` -- a property of `comments`, can be: * 0: banned * 1: normal * 3: draft +* 4: moderated -- i.e. node created by a first-time poster, and has not yet been "approved" -The status for Node is now the same for comment in our Code base except for status = 4 +The status for Node is now the same for comment in our Code base except for status = 5 ### Answers From 3a84bc289a5d07fc9e4409cbda7b8c9e6c86ea95 Mon Sep 17 00:00:00 2001 From: d1g1t4ld1n4 Date: Mon, 17 Dec 2018 09:35:45 -0500 Subject: [PATCH 06/10] Update node_tags.yml --- test/fixtures/node_tags.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/fixtures/node_tags.yml b/test/fixtures/node_tags.yml index 3221d8a4e4..d16cc0a856 100644 --- a/test/fixtures/node_tags.yml +++ b/test/fixtures/node_tags.yml @@ -9,7 +9,7 @@ awesome: uid: 2 nid: 1 date: <%= DateTime.now.to_i %> - + awesome2: tid: 2 uid: 2 From f703a1bb59b12fbb79228f32de4beffcf863270d Mon Sep 17 00:00:00 2001 From: Gaurav Sachdeva Date: Mon, 17 Dec 2018 19:36:04 -0500 Subject: [PATCH 07/10] Update doc/DATA_MODEL.md Co-Authored-By: dinaelhanan --- doc/DATA_MODEL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/DATA_MODEL.md b/doc/DATA_MODEL.md index 3531fe194f..f9ab8dcf88 100644 --- a/doc/DATA_MODEL.md +++ b/doc/DATA_MODEL.md @@ -72,7 +72,7 @@ They are typically cached for quick loading, and can be inserted anywhere in the Comments belong to Notes via `nid`, and each have an author via `uid`; primary key `cid`. Maps also have comments via `nid`, and Answers may also have comments, via `aid`. -Node `status` -- a property of `comments`, can be: +Comment `status` -- a property of `comments`, can be: * 0: banned * 1: normal From be877241e66ca5b77ce73336e3eee24f3ae38a33 Mon Sep 17 00:00:00 2001 From: Gaurav Sachdeva Date: Mon, 17 Dec 2018 19:36:14 -0500 Subject: [PATCH 08/10] Update doc/DATA_MODEL.md Co-Authored-By: dinaelhanan --- doc/DATA_MODEL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/DATA_MODEL.md b/doc/DATA_MODEL.md index f9ab8dcf88..4c6322baf5 100644 --- a/doc/DATA_MODEL.md +++ b/doc/DATA_MODEL.md @@ -77,7 +77,7 @@ Comment `status` -- a property of `comments`, can be: * 0: banned * 1: normal * 3: draft -* 4: moderated -- i.e. node created by a first-time poster, and has not yet been "approved" +* 4: moderated -- i.e. comment created by a first-time poster, and has not yet been "approved" The status for Node is now the same for comment in our Code base except for status = 5 From 9eae457b51ebabf6c462c547ffb7dac650586586 Mon Sep 17 00:00:00 2001 From: d1g1t4ld1n4 Date: Mon, 17 Dec 2018 19:36:54 -0500 Subject: [PATCH 09/10] Update DATA_MODEL.md --- doc/DATA_MODEL.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/doc/DATA_MODEL.md b/doc/DATA_MODEL.md index 4c6322baf5..f589a6c40f 100644 --- a/doc/DATA_MODEL.md +++ b/doc/DATA_MODEL.md @@ -79,8 +79,6 @@ Comment `status` -- a property of `comments`, can be: * 3: draft * 4: moderated -- i.e. comment created by a first-time poster, and has not yet been "approved" -The status for Node is now the same for comment in our Code base except for status = 5 - ### Answers Answers are similar to Comments, but are used in Question-type Notes, and may each have Comments of their own. Primary key `aid`. From 3d4228bcce7466e8d30bd173e6c4ec91490f06ee Mon Sep 17 00:00:00 2001 From: Gaurav Sachdeva Date: Tue, 18 Dec 2018 18:45:41 +0530 Subject: [PATCH 10/10] Quick fix --- doc/DATA_MODEL.md | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/DATA_MODEL.md b/doc/DATA_MODEL.md index f589a6c40f..b24f9037c5 100644 --- a/doc/DATA_MODEL.md +++ b/doc/DATA_MODEL.md @@ -76,7 +76,6 @@ Comment `status` -- a property of `comments`, can be: * 0: banned * 1: normal -* 3: draft * 4: moderated -- i.e. comment created by a first-time poster, and has not yet been "approved" ### Answers