Skip to content
This repository was archived by the owner on Mar 7, 2018. It is now read-only.

Commit 8dfe7c7

Browse files
author
David Underwood
committed
Merge branch 'master' of github.com:Shopify/dashing
* 'master' of github.com:Shopify/dashing: render titles correctly
2 parents 86d8c29 + 6e19ec4 commit 8dfe7c7

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

templates/project/dashboards/sample.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<% content_for(:title) { "My super sweet dashboard" } %>
1+
<% content_for :title do %>My super sweet dashboard<% end %>
22
<div class="gridster">
33
<ul>
44
<li data-row="1" data-col="1" data-sizex="2" data-sizey="1">

templates/project/dashboards/sampletv.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ $(function() {
88
</script>
99

1010

11-
<% content_for(:title) { "1080p dashboard" } %>
11+
<% content_for :title do %>1080p dashboard<% end %>
1212

1313
<div class="gridster">
1414
<ul>

test/app_test.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_get_events
4040
assert_equal 200, last_response.status
4141
assert_equal 8, parse_data(@connection[0])['value']
4242
end
43-
43+
4444
def test_redirect_to_default_dashboard
4545
with_generated_project do
4646
Sinatra::Application.settings.default_dashboard = 'test1'
@@ -76,6 +76,13 @@ def test_get_dashboard
7676
end
7777
end
7878

79+
def test_page_title_set_correctly
80+
with_generated_project do
81+
get '/sampletv'
82+
assert_include last_response.body, '<title>1080p dashboard</title>'
83+
end
84+
end
85+
7986
begin
8087
require 'haml'
8188

0 commit comments

Comments
 (0)