Skip to content

Commit 5f11c57

Browse files
committed
New JSON for spec
1 parent 107e43d commit 5f11c57

File tree

2 files changed

+54
-2
lines changed

2 files changed

+54
-2
lines changed

api/courses/1/events.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
tasks: [
3+
{
4+
id: 2,
5+
title: "iReading #1 - Intro and Subchapter #1",
6+
opens_at: "2015-04-23T18:20:42.891Z",
7+
due_at: "2015-04-30T18:20:42.891Z",
8+
type: "reading",
9+
complete: true
10+
},
11+
{
12+
id: 12,
13+
title: "Homework #1 - Odd Exercises",
14+
opens_at: "2015-04-23T18:20:46.595Z",
15+
due_at: "2015-04-30T18:20:46.595Z",
16+
type: "homework",
17+
complete: true
18+
},
19+
{
20+
id: 22,
21+
title: "iReading #2 - Subchapter #2",
22+
opens_at: "2015-04-23T18:20:51.601Z",
23+
due_at: "2015-04-30T18:20:51.601Z",
24+
type: "reading",
25+
complete: false
26+
},
27+
{
28+
id: 32,
29+
title: "Homework #2 - Even Exercises",
30+
opens_at: "2015-04-23T18:20:54.808Z",
31+
due_at: "2015-04-30T18:20:54.808Z",
32+
type: "homework",
33+
complete: false
34+
},
35+
{
36+
id: 42,
37+
title: "iReading #3 - Subchapter #3",
38+
opens_at: "2015-04-23T18:20:59.650Z",
39+
due_at: "2015-04-30T18:20:59.650Z",
40+
type: "reading",
41+
complete: false
42+
},
43+
{
44+
id: 52,
45+
title: "Homework #3 - Fibonacci Exercises",
46+
opens_at: "2015-04-23T18:21:04.592Z",
47+
due_at: "2015-04-30T18:21:04.592Z",
48+
type: "homework",
49+
complete: false
50+
}
51+
]
52+
}

test/components/student-dashboard.spec.coffee

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ ReactTestUtils = React.addons.TestUtils
77
{StudentDashboard} = require '../../src/components/student-dashboard'
88
{StudentDashboardStore, StudentDashboardActions} = require '../../src/flux/student-dashboard'
99

10-
DATA = require '../../api/courses/1/dashboard.json'
1110
COURSE_ID = '1'
11+
DATA = require "../../api/courses/#{COURSE_ID}/events.json"
1212

1313
describe 'Student Dashboard Component', ->
1414
beforeEach (done) ->
1515
StudentDashboardActions.reset()
1616
StudentDashboardActions.loaded(DATA, COURSE_ID)
1717
routerStub.goTo("/courses/#{COURSE_ID}/dashboard")
1818
.then (result) =>
19-
@dashboard = ReactTestUtils.findRenderedComponentWithType(result.component,StudentDashboard)
19+
@dashboard = ReactTestUtils.findRenderedComponentWithType(result.component, StudentDashboard)
2020
@state = result
2121
done()
2222

0 commit comments

Comments
 (0)