Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#38975 closed enhancement (fixed)

REST API: Add tests for empty or "no-op" updates

Reported by: jnylen0's profile jnylen0 Owned by: jnylen0's profile jnylen0
Milestone: 4.7 Priority: normal
Severity: normal Version: 4.7
Component: REST API Keywords: has-unit-tests commit dev-reviewed
Focuses: Cc:

Description

"Empty" updates that don't change any stored values should be allowed for all resource types. This patch adds tests accordingly for posts, terms, and users.

This is currently broken for comments. See ticket:38700#comment:14 for details.

Attachments (1)

38975.diff (3.8 KB) - added by jnylen0 8 years ago.

Download all attachments as: .zip

Change History (5)

@jnylen0
8 years ago

#1 @joehoyle
8 years ago

Given we also have the test for comments in #38700, maybe we should remove it from this patch, and then we can commit.

#2 @pento
8 years ago

  • Keywords commit dev-reviewed added
  • Owner set to jnylen0
  • Status changed from new to assigned

#3 @jnylen0
8 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 39371:

REST API: Add tests for empty or "no-op" updates.

The API should allow updates that don't actually change anything. This allows
clients to, for example, accidentally send the same request twice without
encountering unexpected errors. This currently works for posts, terms, and
users, so this commit adds test cases accordingly.

See #38700 for issues preventing this from working for comments.

Fixes #38975.

#4 @pento
8 years ago

In 39372:

REST API: Add tests for empty or "no-op" updates.

The API should allow updates that don't actually change anything. This allows clients to, for example, accidentally send the same request twice without encountering unexpected errors. This currently works for posts, terms, and users, so this commit adds test cases accordingly.

See #38700 for issues preventing this from working for comments.

Merge of [39371] to the 4.7 branch.

Props jnylen0.
See #38975.

Note: See TracTickets for help on using tickets.