-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Site Utils: Added canUpdateFiles method to site utils #682
Conversation
}, | ||
|
||
canUpdateFiles( site ) { | ||
if ( site && ! site.hasMinimumJetpackVersion ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should check for if ( ! site )
at the beginning of the method. So the following if
s doesn't fail if site
is undefined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the api endpoint so that we don't need this part any more.
bed534d
to
e27616b
Compare
assert.isFalse( SiteUtils.canUpdateFiles( { hello: 'not important' } ) ); | ||
} ); | ||
|
||
it( 'canUpdateFiles should return true when passed a site data that will ', function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"that will..." wait for it 😛
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's the best way of keeping people interested!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't know what you are talking about >> <<
Besides @lezama comment, I think this looks pretty good |
… to be more fine grained about what the site objects we allow the to update files
…pdateFiles method
6002032
to
922660f
Compare
…ions Site Utils: Added canUpdateFiles method to site utils.
This PR just adds test for
canUpdateFiles
method on site utils.And removed a deprecated reason for why a site file updates are disabled.
To test
run the tests via make test in the
/client/lib/site/
directory viamake test
command.cc: @johnHackworth, @lezama, @ebinnion