mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2025-01-06 06:28:33 +03:00
Use bug icon for fatal errors
This commit is contained in:
parent
9c6a5fb4fa
commit
e24a562387
@ -1,6 +1,6 @@
|
||||
NotificationManager = require '../src/notification-manager'
|
||||
|
||||
describe "NotificationManager", ->
|
||||
fdescribe "NotificationManager", ->
|
||||
[manager] = []
|
||||
|
||||
beforeEach ->
|
||||
|
@ -1,12 +1,12 @@
|
||||
Notification = require '../src/notification'
|
||||
|
||||
describe "Notification", ->
|
||||
fdescribe "Notification", ->
|
||||
[notification] = []
|
||||
|
||||
describe "::getIcon()", ->
|
||||
it "returns a default when no icon specified", ->
|
||||
notification = new Notification('error', 'message!')
|
||||
expect(notification.getIcon()).toBe 'bug'
|
||||
expect(notification.getIcon()).toBe 'flame'
|
||||
|
||||
it "returns the icon specified", ->
|
||||
notification = new Notification('error', 'message!', icon: 'my-icon')
|
||||
|
@ -18,8 +18,8 @@ class Notification
|
||||
getIcon: ->
|
||||
return @options.icon if @options.icon?
|
||||
switch @type
|
||||
when 'fatal' then 'flame'
|
||||
when 'error' then 'bug'
|
||||
when 'fatal' then 'bug'
|
||||
when 'error' then 'flame'
|
||||
when 'warning' then 'alert'
|
||||
when 'info' then 'info'
|
||||
when 'success' then 'check'
|
||||
|
Loading…
Reference in New Issue
Block a user