Commit 67664c32

mo <mo.khan@gmail.com>
2017-09-08 02:16:30
fix tests.
1 parent 3be5b99
Changed files (1)
spec
javascripts
spec/javascripts/models/session_spec.js.coffee
@@ -5,17 +5,13 @@ describe "CakeSide.Models.Session", ->
     subject = new CakeSide.Models.Session()
 
   it "is invalid, when the email is missing", ->
-    attributeName = I18n.t("activerecord.attributes.session.username")
-    error = I18n.t("activerecord.errors.messages.blank")
-    expectedError = "#{attributeName} #{error}"
+    expectedError = "Email can't be blank"
 
     expect(subject.isValid()).toEqual(false)
     expect(subject.validationError['username']).toEqual(expectedError)
 
   it "is invalid, when the password is missing", ->
-    attributeName = I18n.t("activerecord.attributes.session.password")
-    error = I18n.t("activerecord.errors.messages.blank")
-    expectedError = "#{attributeName} #{error}"
+    expectedError = "Password can't be blank"
 
     expect(subject.isValid()).toEqual(false)
     expect(subject.validationError['password']).toEqual(expectedError)