Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cs_comments_service
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
cs_comments_service
Commits
10826f6c
Commit
10826f6c
authored
Sep 05, 2016
by
Saqib
Browse files
Options
Browse Files
Download
Plain Diff
fix merge conflicts
parents
ee9539c4
33b2bd8d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
3 deletions
+25
-3
AUTHORS
+0
-3
spec/api/comment_thread_spec.rb
+25
-0
No files found.
AUTHORS
View file @
10826f6c
...
@@ -25,6 +25,3 @@ Bill DeRusha <bill@edx.org>
...
@@ -25,6 +25,3 @@ Bill DeRusha <bill@edx.org>
Brian Beggs <macdiesel@gmail.com>
Brian Beggs <macdiesel@gmail.com>
Clinton Blackburn <cblackburn@edx.org>
Clinton Blackburn <cblackburn@edx.org>
Eugeny Kolpakov <eugeny.kolpakov@gmail.com>
Eugeny Kolpakov <eugeny.kolpakov@gmail.com>
Ben McMorran <ben.mcmorran@gmail.com>
Bill DeRusha <bill@edx.org>
Eugeny Kolpakov <eugeny.kolpakov@gmail.com>
spec/api/comment_thread_spec.rb
View file @
10826f6c
...
@@ -574,6 +574,31 @@ describe "app" do
...
@@ -574,6 +574,31 @@ describe "app" do
json_response
[
"read"
].
should
==
true
json_response
[
"read"
].
should
==
true
end
end
# Test active and non active thread count for a course
it
"test the number of active and non active threads for a course"
do
User
.
all
.
delete
Content
.
all
.
delete
@user
=
create_test_user
(
999
)
@threads
=
{}
5
.
times
do
|
n
|
thread_key
=
"t
#{
n
}
"
thread
=
make_thread
(
@user
,
thread_key
,
DFLT_COURSE_ID
,
"pdq"
)
@threads
[
n
]
=
thread
end
time_threshold
=
2
.
day
.
ago
@threads
[
0
].
last_activity_at
=
time_threshold
@threads
[
0
].
save!
@threads
[
1
].
last_activity_at
=
time_threshold
@threads
[
1
].
save!
get
"/api/v1/courses/
#{
DFLT_COURSE_ID
}
/stats"
last_response
.
should
be_ok
response
=
parse
last_response
.
body
response
[
"num_threads"
].
should
==
5
response
[
"num_active_threads"
].
should
==
3
end
def
test_unicode_data
(
text
)
def
test_unicode_data
(
text
)
thread
=
create
(
:comment_thread
,
body:
text
)
thread
=
create
(
:comment_thread
,
body:
text
)
create
(
:comment
,
comment_thread:
thread
,
body:
text
)
create
(
:comment
,
comment_thread:
thread
,
body:
text
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment