Commit Graph

17 Commits

Author SHA1 Message Date
Robin Ward 61ce5c210c FIX: S3Cdn link clicks weren't working 2016-06-28 15:52:38 -04:00
Andy Waite 3e50313fdc Prepare for separation of RSpec helper files
Since rspec-rails 3, the default installation creates two helper files:
* `spec_helper.rb`
* `rails_helper.rb`

`spec_helper.rb` is intended as a way of running specs that do not
require Rails, whereas `rails_helper.rb` loads Rails (as Discourse's
current `spec_helper.rb` does).

For more information:

https://www.relishapp.com/rspec/rspec-rails/docs/upgrade#default-helper-files

In this commit, I've simply replaced all instances of `spec_helper` with
`rails_helper`, and renamed the original `spec_helper.rb`.

This brings the Discourse project closer to the standard usage of RSpec
in a Rails app.

At present, every spec relies on loading Rails, but there are likely
many that don't need to. In a future pull request, I hope to introduce a
separate, minimal `spec_helper.rb` which can be used in tests which
don't rely on Rails.
2015-12-01 20:39:42 +00:00
Sam a3c6cd7b38 FIX: handle link tracking correctly for cdn based urls
(usually attachments)
2015-08-05 12:15:08 +10:00
Sam 54b780439d FIX: CDN should always be whitelisted correctly 2015-08-05 11:49:11 +10:00
Régis Hanol 682656fa6c FIX: only redirect to whitelisted hostnames 2015-04-01 22:59:25 +02:00
Régis Hanol 0f4a4651a9 FIX: youtube preview video title link doesn't work 2015-04-01 18:23:27 +02:00
Luciano Sousa b3d769ff4f Update rspec syntax to v3
update rspec syntax to v3

change syntax to rspec v3

oops. fix typo

mailers classes with rspec3 syntax

helpers with rspec3 syntax

jobs with rspec3 syntax

serializers with rspec3 syntax

views with rspec3 syntax

support to rspec3 syntax

category spec with rspec3 syntax
2015-01-05 11:59:30 -03:00
Robin Ward dd1ebb535b FIX: Could not download exported data on some sites 2014-11-20 14:02:10 -05:00
Régis Hanol de76b512c1 fix most deprecations in the specs (still some left) 2014-09-25 17:44:48 +02:00
Robin Ward 4f6283ba56 FIX: Accept HTTPS or HTTP urls on redirect 2014-01-14 15:02:05 -05:00
Sam 6e2797112d Attempt to fix spec under vagrant 2014-01-07 09:26:30 +11:00
Sam db1d01d1a2 Discourse as a Mailing List improvements
FEATURE: context is not emailed if we previously emailed you the post
FEATURE: site setting to enable_watch_new_topics , false by default.
  When enables users can elect to watch everything by default
FIX: Custom email subjects (x quoted you in [title], x replied to [title])
  was removed, this broke email grouping. TBD, include info in footer somehow
FIX: topic user specs were messy, reduce side effects
2013-12-30 13:02:12 +11:00
Robin Ward c28b377494 Don't redirect to arbitrary URLs via link tracker 2013-07-26 12:14:11 -04:00
Dan Johnson 2e478d8537 TopicLinkClick: convert 'ip' (bigint) -> 'ip_address' (inet)
When accessed over IPv6, the ip address of the user is a 128-bit number,
too big for PostgreSQL's bigint data type. Since PostgresSQL has the
built-in inet type, which handles both IPv4 and IPv6 addresses, we
should use that instead. Where this is done elsewhere in the codebase,
the column is called ip_address, so we should follow that convention as
well.

This migration uses a SQL command to populate the new field from the old
one, so as not to rely on the TopicLinkClick model class, which should
keep the migration from failing if that class is modified in the future.
2013-06-25 19:41:19 -04:00
Sam 870e59883b secure the links on the topic pages, eliminated deleted topics as well. 2013-06-05 16:10:26 +10:00
Gosha Arinich cafc75b238 remove trailing whitespaces ❤️ 2013-02-26 07:31:35 +03:00
Robin Ward 21b5628528 Initial release of Discourse 2013-02-05 14:16:51 -05:00