Yes, sorry, I forgot to say that I fixed the failing tests in later commits, removing the check for presence macros from User unit test.

Best regards, Rodrigo.

Em 27-06-2011 05:00, Christian Johansen escreveu:
Good stuff as usual Rodrigo. I'm not seeing the test failures you're talking about? About the line you removed, I would assume it's intent was to not require login and email for openid users, but as you say the other validations seem to make that a requirement anyway. I'll investigate.

Christian

On Fri, Jun 24, 2011 at 23:32, Rodrigo Rosenfeld Rosas <[email protected] <mailto:[email protected]>> wrote:

    Christian, it is not finished yet, but I won't have time soon to
    clean it up (hope to do that on next weekend).

    If you are curious, take a look at my branch "devise-openid".

    Some tests are failing because I removed what I think is a
    redundant line in User model:

      validates_presence_of     :login, :email,               :if =>
    :password_required? # <- removed that line
      validates_format_of       :login, :with =>
    /^#{USERNAME_FORMAT_ON_CREATE}$/i, :on => :create
      validates_format_of       :login, :with =>
    /^#{USERNAME_FORMAT}$/i, :on => :update
      validates_format_of       :email, :with => Email::FORMAT
      ...
      validates_length_of       :login,    :within => 3..40
      validates_length_of       :email,    :within => 3..100

    I removed the first line because the other validations will
    already make it sure that login and e-mail should be present since
    they don't add options like allow_nil and allow_blank.

    I think those tests should be fixed instead...

    There are other OpenID related tests that should be fixed
    (validation for valid URL) or removed.

    Tip: don't try to read each commit separately as I tried one
    solution and than changed to another one. Just do a diff between
    the first commit changing to Devise (with a single failing test)
    and the last one...

    Hope you like it ;)

-- To post to this group, send email to [email protected]
    <mailto:[email protected]>
    To unsubscribe from this group, send email to
    [email protected]
    <mailto:gitorious%[email protected]>




--
MVH
Christian
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]

--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]

Reply via email to