Use bug icon for fatal errors

This commit is contained in:
Ben Ogle 2014-11-20 18:54:51 -08:00
parent 9c6a5fb4fa
commit e24a562387
3 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
NotificationManager = require '../src/notification-manager'
describe "NotificationManager", ->
fdescribe "NotificationManager", ->
[manager] = []
beforeEach ->

View File

@ -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')

View File

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