   'helpers/fakeENV'
   'helpers/jquery.simulate'
   'compiled/behaviors/tooltip'
-], (Backbone, _, AssignmentGroupCollection, AssignmentGroup, Assignment, CreateAssignmentView, DialogFormView, $, tz, juneau, french, I18nStubber, fakeENV) ->
+], (
+  Backbone,
+  _,
+  AssignmentGroupCollection,
+  AssignmentGroup,
+  Assignment,
+  CreateAssignmentView,
+  DialogFormView,
+  $,
+  tz,
+  juneau,
+  french,
+  I18nStubber,
+  fakeENV) ->
 
   fixtures = $('#fixtures')
 

    view.$el.appendTo $('#fixtures')
    view.render()

  QUnit.module 'CreateAssignmentView',
    setup: ->
      @assignment1 = new Assignment(buildAssignment1())

    equal errors["name"].length, 1
    equal errors["name"][0]["message"], "Name is required!"

  test "has an error when a name > 256 chars", ->
    view = createView(@assignment3)
    errors = nameLengthHelper(view, 257, false, 30, '0')
    ok errors["name"]
    equal errors["name"].length, 1
    equal errors["name"][0]["message"], "Name is too long, must be under 256 characters"

  test "allows assignment to save when a name < 255 chars, MAX_NAME_LENGTH is not required and post_to_sis is true", ->
    view = createView(@assignment3)
    errors = nameLengthHelper(view, 254, false, 30, '1')
    equal errors.length, 0

  test "allows assignment to save when a name < 255 chars, MAX_NAME_LENGTH is not required and post_to_sis is false", ->
    view = createView(@assignment3)
    errors = nameLengthHelper(view, 254, false, 30, '0')
    equal errors.length, 0

  test "has an error when a name > MAX_NAME_LENGTH chars if MAX_NAME_LENGTH is custom, required and post_to_sis is true", ->
    view = createView(@assignment3)
    errors = nameLengthHelper(view, 7, true, 5, '1')
    ok errors["name"]
    equal errors["name"].length, 1
    equal errors["name"][0]["message"], "Name is too long, must be under #{ENV.MAX_NAME_LENGTH + 1} characters"

  test "allows assignment to save when name > MAX_NAME_LENGTH chars if MAX_NAME_LENGTH is custom, required and post_to_sis is false", ->
    view = createView(@assignment3)
    errors = nameLengthHelper(view, 7, true, 5, '0')
    equal errors.length, 0

  test "allows assignment to save when name < MAX_NAME_LENGTH chars if MAX_NAME_LENGTH is custom, required and post_to_sis is true", ->
    view = createView(@assignment3)
    errors = nameLengthHelper(view, 30, true, 30, '1')
    equal errors.length, 0

  test "don't validate name if it is frozen", ->
