mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-12-27 19:07:15 +08:00
fix(delete-category): Resolve regression in error message (#1244)
This commit is contained in:
parent
f4e3137b5b
commit
52681baade
2 changed files with 9 additions and 1 deletions
|
@ -118,3 +118,10 @@ describe "DestroyCategoryTask", ->
|
|||
model = DatabaseTransaction.prototype.persistModel.calls[0].args[0]
|
||||
expect(model.serverId).toEqual "server-444"
|
||||
expect(model.isDeleted).toBe false
|
||||
|
||||
describe "_notifyUserOfError", ->
|
||||
it "should present an error dialog", ->
|
||||
spyOn(NylasEnv, 'showErrorDialog')
|
||||
task = makeTask()
|
||||
task._notifyUserOfError()
|
||||
expect(NylasEnv.showErrorDialog).toHaveBeenCalled()
|
||||
|
|
|
@ -64,8 +64,9 @@ class DestroyCategoryTask extends Task
|
|||
|
||||
_notifyUserOfError: (category = @category) ->
|
||||
displayName = category.displayName
|
||||
displayType = category.displayType()
|
||||
|
||||
msg = "The #{category.displayType()} #{displayName} could not be deleted."
|
||||
msg = "The #{displayType} #{displayName} could not be deleted."
|
||||
if displayType is 'folder'
|
||||
msg += " Make sure the folder you want to delete is empty before deleting it."
|
||||
|
||||
|
|
Loading…
Reference in a new issue