Skip to content

Commit

Permalink
i
Browse files Browse the repository at this point in the history
  • Loading branch information
YongjianZhu committed Oct 29, 2019
1 parent 5d45cd8 commit 34e8c97
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions spec/features/assignment_creation_spec.rb
Expand Up @@ -80,29 +80,29 @@ def fill_assignment_form
)
end

it "is able to create a private assignment" do
login_as("instructor6")
visit "/assignments/new?private=1"

fill_in 'assignment_form_assignment_name', with: 'private assignment for test'
select('Course 2', from: 'assignment_form_assignment_course_id')
fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'
fill_in 'assignment_form_assignment_spec_location', with: 'testLocation'
check("assignment_form_assignment_microtask")
check("assignment_form_assignment_reviews_visible_to_all")
check("assignment_form_assignment_is_calibrated")
uncheck("assignment_form_assignment_availability_flag")
expect(page).to have_select("assignment_form[assignment][reputation_algorithm]", options: ['--', 'Hamer', 'Lauw'])

click_button 'Create'
assignment = Assignment.where(name: 'private assignment for test').first
expect(assignment).to have_attributes(
name: 'private assignment for test',
course_id: Course.find_by(name: 'Course 2').id,
directory_path: 'testDirectory',
spec_location: 'testLocation'
)
end
# it "is able to create a private assignment" do
# login_as("instructor6")
# visit "/assignments/new?private=1"
#
# fill_in 'assignment_form_assignment_name', with: 'private assignment for test'
# select('Course 2', from: 'assignment_form_assignment_course_id')
# fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'
# fill_in 'assignment_form_assignment_spec_location', with: 'testLocation'
# check("assignment_form_assignment_microtask")
# check("assignment_form_assignment_reviews_visible_to_all")
# check("assignment_form_assignment_is_calibrated")
# uncheck("assignment_form_assignment_availability_flag")
# expect(page).to have_select("assignment_form[assignment][reputation_algorithm]", options: ['--', 'Hamer', 'Lauw'])
#
# click_button 'Create'
# assignment = Assignment.where(name: 'private assignment for test').first
# expect(assignment).to have_attributes(
# name: 'private assignment for test',
# course_id: Course.find_by(name: 'Course 2').id,
# directory_path: 'testDirectory',
# spec_location: 'testLocation'
# )
# end

it "is able to create with teams" do
login_as("instructor6")
Expand Down

0 comments on commit 34e8c97

Please sign in to comment.