Skip to content
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

Merged
merged 3 commits into from
Nov 26, 2015

Conversation

enejb
Copy link
Member

@enejb enejb commented Nov 24, 2015

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 via make test command.

cc: @johnHackworth, @lezama, @ebinnion

@enejb enejb added Jetpack [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. Jetpack Plugins labels Nov 24, 2015
},

canUpdateFiles( site ) {
if ( site && ! site.hasMinimumJetpackVersion ) {
Copy link
Contributor

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 ifs doesn't fail if site is undefined.

Copy link
Member Author

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.

@enejb enejb force-pushed the fix/improved-file-mod-permissions branch from bed534d to e27616b Compare November 25, 2015 18:58
@lezama lezama added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Status] Ready to Merge labels Nov 25, 2015
assert.isFalse( SiteUtils.canUpdateFiles( { hello: 'not important' } ) );
} );

it( 'canUpdateFiles should return true when passed a site data that will ', function() {
Copy link
Contributor

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 😛

Copy link
Contributor

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!

Copy link
Member Author

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 >> <<

@johnHackworth
Copy link
Contributor

Besides @lezama comment, I think this looks pretty good

@enejb enejb force-pushed the fix/improved-file-mod-permissions branch from 6002032 to 922660f Compare November 26, 2015 19:31
@enejb enejb added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] Needs Author Reply labels Nov 26, 2015
@lezama lezama added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Nov 26, 2015
enejb added a commit that referenced this pull request Nov 26, 2015
…ions

Site Utils: Added canUpdateFiles method to site utils.
@enejb enejb merged commit 758c146 into master Nov 26, 2015
@enejb enejb deleted the fix/improved-file-mod-permissions branch November 26, 2015 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants