From c1df25e856951f41234718ef8fe916cf851f61d7 Mon Sep 17 00:00:00 2001 From: riking Date: Tue, 9 Sep 2014 16:24:20 -0700 Subject: [PATCH] Add test for "on day, name wrote" quote trigger --- spec/components/email/receiver_spec.rb | 4 + spec/fixtures/emails/on_wrote.eml | 277 +++++++++++++++++++++++++ 2 files changed, 281 insertions(+) create mode 100644 spec/fixtures/emails/on_wrote.eml diff --git a/spec/components/email/receiver_spec.rb b/spec/components/email/receiver_spec.rb index 5d3ad72d7..cf5f6a2f5 100644 --- a/spec/components/email/receiver_spec.rb +++ b/spec/components/email/receiver_spec.rb @@ -61,6 +61,10 @@ describe Email::Receiver do test_parse_body(fixture_file("emails/via_line.eml")).should == "Hello this email has content!" end + it "removes an 'on date wrote' quoting line" do + test_parse_body(fixture_file("emails/on_wrote.eml")).should == "Sure, all you need to do is frobnicate the foobar and you'll be all set!" + end + it "removes the 'Previous Discussion' marker" do test_parse_body(fixture_file("emails/previous.eml")).should == "This will not include the previous discussion that is present in this email." end diff --git a/spec/fixtures/emails/on_wrote.eml b/spec/fixtures/emails/on_wrote.eml new file mode 100644 index 000000000..feb59bd27 --- /dev/null +++ b/spec/fixtures/emails/on_wrote.eml @@ -0,0 +1,277 @@ + +MIME-Version: 1.0 +Received: by 10.107.9.17 with HTTP; Tue, 9 Sep 2014 16:18:19 -0700 (PDT) +In-Reply-To: <540f16d4c08d9_4a3f9ff6d61890391c@tiefighter4-meta.mail> +References: + <540f16d4c08d9_4a3f9ff6d61890391c@tiefighter4-meta.mail> +Date: Tue, 9 Sep 2014 16:18:19 -0700 +Delivered-To: kanepyork@gmail.com +Message-ID: +Subject: Re: [Discourse Meta] Badge icons - where to find them? +From: Kane York +To: Discourse Meta +Content-Type: multipart/alternative; boundary=001a11c34c389e728f0502aa26a0 + +--001a11c34c389e728f0502aa26a0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: quoted-printable + +Sure, all you need to do is frobnicate the foobar and you'll be all set! + +On Tue, Sep 9, 2014 at 8:03 AM, gordon_ryan wrote: + +> gordon_ryan +> September 9 +> +> @riking - willing to step by +> step of the custom icon method for an admittedly ignorant admin? Seriousl= +y +> confused. +> +> Or anyone else who knows how to do this [image: smiley] +> +> To respond, reply to this email or visit +> https://meta.discourse.org/t/badge-icons-where-to-find-them/18058/9 in +> your browser. +> ------------------------------ +> Previous Replies riking +> July 25 +> +> Check out the "HTML Head" section in the "Content" tab of the admin panel= +. +> meglio +> July 25 +> +> How will it load the related custom font? +> riking +> July 25 +> +> Here's an example of the styles that FA applies. I'll use fa-heart"> as the example. +> +> .fa { +> display: inline-block; +> font-family: FontAwesome; +> font-style: normal; +> font-weight: normal; +> line-height: 1; +> -webkit-font-smoothing: antialiased; +> -moz-osx-font-smoothing: grayscale; +> } +> .fa-heart:before { +> content: "\f004"; +> } +> +> So you could do this in your site stylesheet: +> +> .fa-custom-burger:before { +> content: "\01f354"; +> font-family: inherit; +> } +> +> And get =F0=9F=8D=94 as your badge icon when you enter custom-burger. +> ------------------------------ +> +> To respond, reply to this email or visit +> https://meta.discourse.org/t/badge-icons-where-to-find-them/18058/9 in +> your browser. +> +> To unsubscribe from these emails, visit your user preferences +> . +> + +--001a11c34c389e728f0502aa26a0 +Content-Type: text/html; charset=UTF-8 +Content-Transfer-Encoding: quoted-printable + +
Sure, all you need to do is frobnicate the foobar and you'll be all s= +et!


= +
On Tue, Sep 9, 2014 at 8:03 AM, gordon_ryan = +<info@discourse.org> wrote:
+ + + + + + + + + + + + +
+ + + gordon_ryan
+ September 9 +
+

@riking- willing to step by step of the custom icon me= +thod for an admittedly ignorant admin? Seriously confused.

+ +

Or anyone else who knows how to do this = +3D"smiley"

+
+ + +
+

To respond, reply to this email or visit https:= +//meta.discourse.org/t/badge-icons-where-to-find-them/18058/9 in your b= +rowser.

+
+
+

Previous Replies

+ + + + + + + + + + + +
+ + + riking
+ July 25 +

Check out the "HTML Head" section in the "Content&= +quot; tab of the admin panel.

+ + + + + + + + + + + +
+ + + meglio
+ July 25 +

How will it load the related custom font?

+ + + + + + + + + + + +
+ + + riking
+ July 25 +
+

Here's an example of the styles that= + FA applies. I'll use <i class=3D"fa fa-heart"></i> as the e= +xample.

+ +

+
.fa {
+  display: inline-block;
+  font-family: FontAwesome;
+  font-style: normal;
+  font-weight: normal;
+  line-height: 1;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+.fa-heart:before {
+  content: "\f004";
+}
+ +

So you could do this in your site styles= +heet:

+ +

+
.fa-custom-burger:before {
+  content: "\01f354";
+  font-family: inherit;
+}
+ +

And get =F0=9F=8D=94 as your badge icon = +when you enter cus= +tom-burger.

+
+ + +
+ +
+

To respond, reply to this email or visit https://me= +ta.discourse.org/t/badge-icons-where-to-find-them/18058/9 in your brows= +er.

+
+
+

To unsubscribe from these emails, visit your user preferences.

+
+
+

+ +--001a11c34c389e728f0502aa26a0-- \ No newline at end of file