Skip to content

Commit

Permalink
Merge pull request #14775 from imtayadeway/bug/notification-actions-d…
Browse files Browse the repository at this point in the history
…elete

Render DELETE action for notifications
  • Loading branch information
abellotti authored Apr 17, 2017
2 parents 33a9ed8 + 6a87cdc commit 030e027
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,8 @@
:post:
- :name: mark_as_seen
- :name: delete
:delete:
- :name: delete
:orchestration_stacks:
:description: Orchestration Stacks
:options:
Expand Down
17 changes: 17 additions & 0 deletions spec/requests/api/notifications_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,23 @@
end
end

describe "notification read" do
it "renders the available actions" do
api_basic_authorize

run_get(notification_url)

expected = {
"actions" => a_collection_including(
a_hash_including("name" => "mark_as_seen", "method" => "post"),
a_hash_including("name" => "delete", "method" => "post"),
a_hash_including("name" => "delete", "method" => "delete")
)
}
expect(response.parsed_body).to include(expected)
end
end

describe 'notification edit' do
it 'is not supported' do
api_basic_authorize
Expand Down

0 comments on commit 030e027

Please sign in to comment.