Commit Graph

45 Commits

Author SHA1 Message Date
rgarcia
dffc5f5eae adds specs 2015-11-23 13:43:48 +01:00
rgarcia
0277106a08 fixes specs 2015-11-17 10:14:11 +01:00
rgarcia
84610db830 marking debates search specs as pending 2015-10-30 22:04:07 +01:00
rgarcia
593ed551d4 adds search specs 2015-10-29 14:29:52 +01:00
kikito
6c5d1faa90 Uses the new field, erased_at, for erased users 2015-10-21 14:28:21 +02:00
juandefelix
2503350526 added models tests for tag_list count validation 2015-10-03 12:03:49 -05:00
rgarcia
590c0b9242 refactors length validations 2015-09-28 14:48:53 +02:00
Enrique García
ae166a6836 Merge pull request #505 from dgilperez/debates_max_votes_editable
Adds setting to control max number of votes for a Debate to be editable
2015-09-22 16:52:52 +02:00
kikito
8ff8a1df7f Makes tags count only visible debates and proposals 2015-09-17 16:54:10 +02:00
David Gil
e985391a8e fixes test names 2015-09-17 15:52:49 +02:00
David Gil
42f1ffb171 adds tests for debate editable with max votes 2015-09-15 21:28:01 +02:00
kikito
47c95078f2 Extract score calculation to a module 2015-09-14 20:36:04 +02:00
kikito
9acb07c323 implements a new hot scoring system 2015-09-14 20:36:04 +02:00
rgarcia
220c611927 consistent spec order in debates and proposals 2015-09-14 13:09:21 +02:00
rgarcia
34a792a79d fixes specs 2015-09-08 15:48:56 +02:00
rgarcia
e49695ba5e adds confidence_score specs 2015-09-08 14:56:52 +02:00
rgarcia
96ae7575b1 adds confidence_score to debates 2015-09-08 14:40:14 +02:00
rgarcia
8f778ace26 removes focus and fixes specs 2015-09-07 17:44:01 +02:00
rgarcia
6606d776f8 expires debate cache after a new flag 2015-09-07 17:24:53 +02:00
rgarcia
4ce95e2735 adds conflictive debates 2015-09-07 16:58:00 +02:00
Juanjo Bazán
e706aaff2c adds extra specs for debate's cache 2015-09-06 12:40:13 +02:00
Juanjo Bazán
60089b8986 uses author info in comment/debate cache
author is already preloaded and we avoid expensive touching methods
2015-09-06 12:13:39 +02:00
rgarcia
9515ccc3a8 adds specs 2015-09-05 22:03:33 +02:00
Juanjo Bazán
771f44c22b adds self.search to Debate 2015-09-05 15:05:56 +02:00
kikito
9bb63e9b32 Makes comments increase the hot_score 2015-09-04 14:04:45 +02:00
kikito
2975c6a38d Makes votes increase/decrease hot score
Debates already call update_attibutes in debates (to update cached
counters), so there is no need to do an “after_voted”: the comment’s
before_save call takes care of it.
2015-09-04 14:04:18 +02:00
kikito
fba4f1fade Adds initial hot score implementation for debates 2015-09-04 12:34:17 +02:00
kikito
134f38a38f Removes debates default order 2015-09-04 11:51:21 +02:00
kikito
e0f8f8d8de Removes Debate.search & uses Debate.tagged_by when appropriate
Using `params` was wrong here because if given an inexistent tag,
@tag_filter was nil but the debates were still filtered by it (so the
listing and what the page title said were different)
2015-09-03 11:17:21 +02:00
Juanjo Bazán
274ddb2589 changes rules for allowing debate votes
first 100 votes are allowed for unverified users
2015-09-02 13:40:38 +02:00
Juanjo Bazán
872a23443b updates anonymous counter in debate when voted
refactors to move all related code to Debate model
2015-09-01 17:49:02 +02:00
Juanjo Bazán
bbf96259fc adds controller check for anonymous votes 2015-09-01 17:49:02 +02:00
Juanjo Bazán
3a15895617 loads seeds for testing 2015-09-01 17:49:01 +02:00
Juanjo Bazán
2e5b5bccb5 adds methods to decide if a user can vote a debate 2015-09-01 17:49:01 +02:00
rgarcia
bea38226fe fixes spacing 2015-08-16 22:45:43 +02:00
rgarcia
4751954377 refactors debate search 2015-08-15 14:57:04 +02:00
David Gil
9a2ef8366e change background by let since model tests do not know about background 2015-08-12 14:59:54 +02:00
David Gil
d134284774 background is the new before(:each) 2015-08-12 14:59:54 +02:00
kikito
87dd655d70 Make debate.description always html_safe 2015-08-04 18:42:49 +02:00
kikito
b53bc42dcd Uses the TagSanitizer in Debate 2015-08-03 19:32:00 +02:00
kikito
824ce3c8fe Add specs for description sanitisation 2015-07-31 16:10:20 +02:00
Juanjo Bazán
df1a800d94 adds editable methods to Debate 2015-07-19 14:46:21 +02:00
rgarcia
967b5cdcb5 adds author validation spec [#11] 2015-07-18 15:09:28 +02:00
rgarcia
62349acc54 adds debate model specs [#5] 2015-07-16 19:26:17 +02:00
rgarcia
b216470d59 adds debate model 2015-07-15 21:07:15 +02:00