spec/intranet/system/responder_spec.rb in intranet-system-1.1.0 vs spec/intranet/system/responder_spec.rb in intranet-system-1.1.1

- old
+ new

@@ -87,34 +87,36 @@ it 'should return a partial HTML content with a loader' do code, mime, content = @responder.generate_page('/index.html', {}) expect(code).to eql(206) expect(mime).to eql('text/html') expect(content).to eql( - Hash[content: "<section>\n<h2>#{I18n.t('system.monitor')}</h2>\n" \ - "<ul class='breadcrumb'>\n" \ - "<li>\n<a href='/index.html'>#{I18n.t('nav.home')}</a>\n</li>\n" \ - "<li>#{I18n.t('system.monitor')}</li>\n" \ - "</ul>\n\n" \ - "<h3 id='cpu_model'>#{I18n.t('system.processor')} : </h3>\n" \ - "<p class='meter' id='load1min'>\n<span class='desc'>1 min</span>\n<span " \ - "class='info'>0.00</span>\n<meter high='90' low='80' max='100' min='0' op" \ - "timum='50' title='0 %' value='0'></meter>\n</p>\n" \ - "<p class='meter' id='load5min'>\n<span class='desc'>5 min</span>\n<span " \ - "class='info'>0.00</span>\n<meter high='90' low='80' max='100' min='0' op" \ - "timum='50' title='0 %' value='0'></meter>\n</p>\n" \ - "<p class='meter' id='load15min'>\n<span class='desc'>15 min</span>\n<spa" \ - "n class='info'>0.00</span>\n<meter high='90' low='80' max='100' min='0' " \ - "optimum='50' title='0 %' value='0'></meter>\n</p>\n" \ - "<h3>#{I18n.t('system.memory')}</h3>\n" \ - "<p class='meter' id='ram'>\n<span class='desc'>RAM</span>\n<span class='" \ - "info'>0 M#{I18n.t('system.byte_abbrev')} #{I18n.t('system.out_of')} 0 M" \ - "#{I18n.t('system.byte_abbrev')}</span>\n<meter high='90' low='80' max='1" \ - "00' min='0' optimum='50' title='0 %' value='0'></meter>\n</p>\n" \ - "<div class='loading' id='swaps'></div>\n" \ - "<h3>#{I18n.t('system.storage')}</h3>\n" \ - "<div class='loading' id='storage'></div>\n" \ - "</section>\n", - title: I18n.t('system.monitor')] + { + content: "<section>\n<h2>#{I18n.t('system.monitor')}</h2>\n" \ + "<ul class='breadcrumb'>\n" \ + "<li>\n<a href='/index.html'>#{I18n.t('nav.home')}</a>\n</li>\n" \ + "<li>#{I18n.t('system.monitor')}</li>\n" \ + "</ul>\n\n" \ + "<h3 id='cpu_model'>#{I18n.t('system.processor')} : </h3>\n" \ + "<p class='meter' id='load1min'>\n<span class='desc'>1 min</span>\n<span cla" \ + "ss='info'>0.00</span>\n<meter high='90' low='80' max='100' min='0' optimum=" \ + "'50' title='0 %' value='0'></meter>\n</p>\n" \ + "<p class='meter' id='load5min'>\n<span class='desc'>5 min</span>\n<span cla" \ + "ss='info'>0.00</span>\n<meter high='90' low='80' max='100' min='0' optimum=" \ + "'50' title='0 %' value='0'></meter>\n</p>\n" \ + "<p class='meter' id='load15min'>\n<span class='desc'>15 min</span>\n<span c" \ + "lass='info'>0.00</span>\n<meter high='90' low='80' max='100' min='0' optimu" \ + "m='50' title='0 %' value='0'></meter>\n</p>\n" \ + "<h3>#{I18n.t('system.memory')}</h3>\n" \ + "<p class='meter' id='ram'>\n<span class='desc'>RAM</span>\n<span class='inf" \ + "o'>0 M#{I18n.t('system.byte_abbrev')} #{I18n.t('system.out_of')} 0 M" \ + "#{I18n.t('system.byte_abbrev')}</span>\n<meter high='90' low='80' max='100'" \ + " min='0' optimum='50' title='0 %' value='0'></meter>\n</p>\n" \ + "<div class='loading' id='swaps'></div>\n" \ + "<h3>#{I18n.t('system.storage')}</h3>\n" \ + "<div class='loading' id='storage'></div>\n" \ + "</section>\n", + title: I18n.t('system.monitor') + } ) end end context 'when asked for \'/api\'' do