Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
schedules
Commits
baf8caf8
Commit
baf8caf8
authored
Apr 08, 2018
by
Zac Wood
Browse files
Fixed controller tests
parent
078aac5d
Changes
6
Hide whitespace changes
Inline
Side-by-side
schedules/db/data/
small
.xlsx
→
schedules/db/data/
testdata
.xlsx
View file @
baf8caf8
File moved
schedules/test/controllers/courses_controller_test.rb
View file @
baf8caf8
...
...
@@ -2,7 +2,7 @@ require 'test_helper'
class
CoursesControllerTest
<
ActionDispatch
::
IntegrationTest
test
"should get index"
do
get
url_for
:
controller
=>
'courses'
,
:
action
=>
'index'
get
url_for
controller
:
'courses'
,
action
:
'index'
assert_response
:success
end
...
...
schedules/test/controllers/sections_controller_test.rb
View file @
baf8caf8
require
'test_helper'
class
SectionsControllerTest
<
ActionDispatch
::
IntegrationTest
# TODO: Fix SectionsController tests
# test "should get index" do
# get url_for action: 'index', controller: 'sections'
# assert_response :success
# end
#
# test "should get show" do
# get url_for controller: 'sections', action: 'show', id: '1'
# assert_response :success
# end
test
"should get index"
do
get
url_for
controller:
'sections'
,
action:
'index'
,
course_id:
1
# get 'api/'
assert_response
:success
end
end
schedules/test/fixtures/courses.yml
View file @
baf8caf8
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one
:
id
:
1
subject
:
MyString
course_number
:
MyString
semester
:
one
...
...
schedules/test/fixtures/sections.yml
View file @
baf8caf8
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one
:
id
:
1
name
:
MyString
crn
:
MyString
section_type
:
MyString
...
...
schedules/test/fixtures/semesters.yml
View file @
baf8caf8
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one
:
id
:
1
season
:
MyString
year
:
MyString
...
...
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