From d1f6c31382c146ae310ef814e0a657f793261845 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Tue, 12 Aug 2014 11:15:32 -0400 Subject: [PATCH] TESTS: Adds integration test for new about route --- .../discourse/templates/about.js.handlebars | 2 +- test/javascripts/fixtures/about.js.es6 | 3 +++ test/javascripts/integration/about-test.js.es6 | 11 +++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 test/javascripts/fixtures/about.js.es6 create mode 100644 test/javascripts/integration/about-test.js.es6 diff --git a/app/assets/javascripts/discourse/templates/about.js.handlebars b/app/assets/javascripts/discourse/templates/about.js.handlebars index 394d8d32e68..ec408eb854a 100644 --- a/app/assets/javascripts/discourse/templates/about.js.handlebars +++ b/app/assets/javascripts/discourse/templates/about.js.handlebars @@ -17,7 +17,7 @@ {{/if}} {{#if moderators}} -
+

{{i18n about.our_moderators}}

diff --git a/test/javascripts/fixtures/about.js.es6 b/test/javascripts/fixtures/about.js.es6 new file mode 100644 index 00000000000..90459eff5bc --- /dev/null +++ b/test/javascripts/fixtures/about.js.es6 @@ -0,0 +1,3 @@ +export default { + "about.json": {"about":{"stats":{"topic_count":5969,"post_count":65860,"user_count":10858,"topics_7_days":112,"posts_7_days":1302,"users_7_days":111,"like_count":37747,"likes_7_days":1143},"description":"Discussion about the next-generation open source Discourse forum software","title":"Discourse Meta","locale":"en","version":"0.9.9.16","moderators":[{"id":3,"username":"supermathie","uploaded_avatar_id":5247,"avatar_template":"/user_avatar/meta.discourse.org/supermathie/{size}/5247.png"},{"id":32,"username":"codinghorror","uploaded_avatar_id":5297,"avatar_template":"/user_avatar/meta.discourse.org/codinghorror/{size}/5297.png"},{"id":19,"username":"eviltrout","uploaded_avatar_id":5275,"avatar_template":"/user_avatar/meta.discourse.org/eviltrout/{size}/5275.png"},{"id":2,"username":"neil","uploaded_avatar_id":5245,"avatar_template":"/user_avatar/meta.discourse.org/neil/{size}/5245.png"},{"id":1,"username":"sam","uploaded_avatar_id":5243,"avatar_template":"/user_avatar/meta.discourse.org/sam/{size}/5243.png"},{"id":1995,"username":"zogstrip","uploaded_avatar_id":8630,"avatar_template":"/user_avatar/meta.discourse.org/zogstrip/{size}/8630.png"}],"admins":[{"id":3,"username":"supermathie","uploaded_avatar_id":5247,"avatar_template":"/user_avatar/meta.discourse.org/supermathie/{size}/5247.png"},{"id":32,"username":"codinghorror","uploaded_avatar_id":5297,"avatar_template":"/user_avatar/meta.discourse.org/codinghorror/{size}/5297.png"},{"id":19,"username":"eviltrout","uploaded_avatar_id":5275,"avatar_template":"/user_avatar/meta.discourse.org/eviltrout/{size}/5275.png"},{"id":38,"username":"frandallfarmer","uploaded_avatar_id":5307,"avatar_template":"/user_avatar/meta.discourse.org/frandallfarmer/{size}/5307.png"},{"id":6626,"username":"riking","uploaded_avatar_id":9779,"avatar_template":"/user_avatar/meta.discourse.org/riking/{size}/9779.png"},{"id":2,"username":"neil","uploaded_avatar_id":5245,"avatar_template":"/user_avatar/meta.discourse.org/neil/{size}/5245.png"},{"id":1,"username":"sam","uploaded_avatar_id":5243,"avatar_template":"/user_avatar/meta.discourse.org/sam/{size}/5243.png"},{"id":1995,"username":"zogstrip","uploaded_avatar_id":8630,"avatar_template":"/user_avatar/meta.discourse.org/zogstrip/{size}/8630.png"}]}} +}; diff --git a/test/javascripts/integration/about-test.js.es6 b/test/javascripts/integration/about-test.js.es6 new file mode 100644 index 00000000000..23796fa76f0 --- /dev/null +++ b/test/javascripts/integration/about-test.js.es6 @@ -0,0 +1,11 @@ +integration("About"); + +test("viewing", function() { + visit("/about"); + andThen(function() { + ok(exists('.about.admins .user-small'), 'has admins'); + ok(exists('.about.moderators .user-small'), 'has moderators'); + ok(exists('.about.stats tr td'), 'has stats'); + }); +}); +