Commit Graph

91 Commits

Author SHA1 Message Date
Sean McGivern 0139b318f1 Prevent ApplicationHelper specs from polluting later ones
We don't want the locale to be set to Brazilian Portuguese for any subsequent
specs!
2017-10-18 16:03:38 +01:00
Bob Van Landuyt 939469cda3 Build the locale path with an `_` instead of a `-`
The locale code is turned into an asset path with an underscore
instead of a dash.

The language codes are transformed by `I18n.locale` into a code with a
dash. But the resources for translating are always stored in a path
using a `_` separating the language and the region code.
2017-10-18 13:10:35 +02:00
Tim Zallmann 27577e8e2b Fixed Tests 2017-10-04 14:27:09 +02:00
Tim Zallmann 1b75296875 Fixed Linting errors + tests 2017-10-04 14:27:09 +02:00
Robert Speicher 72a7b30c9f Change all `:empty_project` to `:project` 2017-08-02 17:47:31 -04:00
Tim Zallmann 52b8a0db68 Resolve "Lazy load images on the Frontend" 2017-07-24 17:36:52 +00:00
Bob Van Landuyt 458f3cf9b0 Update specs for new upload path 2017-07-18 15:38:54 +02:00
Douwe Maan fe13f11041 Create and use project path helpers that only need a project, no namespace 2017-07-05 11:11:59 -05:00
Rémy Coutable 4818f904c2
Use stub_application_setting when testing ApplicationHelper#support_url
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-04 13:54:35 +02:00
Grzegorz Bizon 0430b76441 Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
Sean McGivern 1c4262156f Fix avatar images in pipeline emails 2017-06-20 15:42:10 +01:00
Robert Speicher a6ec5121f0 Correct RSpec/SingleLineHook cop offenses 2017-06-14 13:18:56 -05:00
Robin Bobbitt e09ddc62b3 Help landing page customizations 2017-06-14 11:40:21 -04:00
DJ Mountney 1d1363e2bb Bring in security changes from the 9.2.5 release
Ran:
 - git format-patch v9.2.2..v9.2.5 --stdout > patchfile.patch
 - git checkout -b 9-2-5-security-patch origin/v9.2.2
 - git apply patchfile.patch
 - git commit
 - [Got the sha ref for the commit]
 - git checkout -b upstream-9-2-security master
 - git cherry-pick <SHA of the patchfile commit>
 - [Resolved conflicts]
 - git cherry-pick --continue
2017-06-07 21:16:20 -07:00
blackst0ne 29a3203b3f Use relative paths for group/project/user avatars 2017-05-10 15:26:17 +11:00
Toon Claes 05e0f50453 Cache the rendered README, but post-process on show
Because the post-processing of the rendered README is dependent on the
context (i.e. the current user), do the post-processing when the
README is being displayed.
2017-04-27 13:22:17 +02:00
Jacob Schatz 97330be9a5 Merge branch 'format-timeago-date' into 'master'
Formats timeago dates to be more friendly

Closes #27537

See merge request !9145
2017-03-05 16:15:25 +00:00
Douwe Maan ad640bc5f9 Use Namespace#full_path instead of #path where appropriate 2017-02-23 17:55:01 -06:00
Semyon Pupkov 0dfccd995a Add active_when helper
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/24036
2017-02-15 14:29:48 +05:00
Phil Hughes a9c80dceb6 Fixed timeago specs 2017-02-13 09:01:09 +00:00
Robert Speicher 2fe13fbc4b Use `:empty_project` where possible in helper specs 2017-01-25 17:10:32 -05:00
Jacob Vosmaer 6731ab5d76 Add Gitlab::Middleware::Multipart 2016-12-15 12:26:36 +01:00
Lin Jen-Shin 9c4e0d6445 Use `Gitlab.config.gitlab.host` over `'localhost'`
This would fix long standing failures running tests on
my development machine, which set `Gitlab.config.gitlab.host`
to another host because it's not my local computer. Now I
finally cannot withstand it and decided to fix them once and
for all.
2016-11-18 20:17:10 +08:00
Clement Ho fa1ac47ef1 Replace jQuery.timeago with timeago.js 2016-11-07 14:49:00 -06:00
tiagonbotelho 519275c110 fixes part1 of files to start using active tense 2016-08-09 15:06:23 +01:00
Annabel Dunstone 9955dc29a8 Update timeago to shorter representation 2016-08-04 15:01:37 -05:00
Phil Hughes 68c9981013 Correctly adds commit ID into dropdown
Removes un-used method
Fixes other Ruby issues
2016-06-18 21:49:20 +01:00
Rémy Coutable 1714883107 Revert "Merge branch 'avatar-cropping' into 'master' "
This reverts commit 01160fc061, reversing
changes made to 4bff9daf8b.
2016-03-15 14:55:40 +01:00
Robert Speicher 93e6282657 Add `:with_avatar` trait to User factory 2016-02-24 13:50:03 -05:00
Ben Boeckel e919b5a4e9 Fix relative links in other markup formats
- Apply the RelativeLinkFilter filter to other formats, e.g.,
  reStructuredText so links from the Files view or the Project view work
- Remove the AsciidocPipeline pipeline

Fixes #3533.
2016-02-12 17:20:59 +01:00
Robert Speicher 100cdce21e Make sure time_ago_with_tooltip is using a Time object
Somehow this test existed on EE but not in CE, so it started failing
after a bad CE-to-EE merge.
2016-01-12 13:13:16 -05:00
Robert Speicher fa36749bce Add two custom Date/Time conversion formats 2016-01-07 20:01:08 -05:00
Robert Speicher 456ddb5eb7 Fix time_ago_with_tooltip for activity feed
Closes #4002
2015-12-11 13:57:49 -05:00
Robert Speicher a1d3b8d7fa Fix spec failure introduced by 9d03bc6fa3 2015-12-07 16:50:20 -05:00
Valery Sizov e0131c5d07 Merge branch 'rails_update_to_4_2' into 'master'
Rails update to 4.2.4

https://gitlab.com/gitlab-org/gitlab-ce/issues/2694

See merge request !1902
2015-11-30 16:49:09 +00:00
Valery Sizov e92ceb7b57 fix specs 2015-11-30 16:12:31 +02:00
Jan-Gerd Tenberge b5c19bcc4d Fix merge error 2015-10-22 21:43:17 +02:00
Jan-Gerd Tenberge b32bb37799 Merge remote-tracking branch 'origin/master' into gravatar-retina 2015-10-22 21:37:44 +02:00
Jan-Gerd Tenberge 34d0cd438a Update spec 2015-10-19 01:22:20 +02:00
Jan-Gerd Tenberge 7d7b6dbb9f Update spec 2015-10-19 01:21:21 +02:00
Yorick Peterse 693e63f523 Allow avatar_icon to operate on a User
If the User object is already known before calling this method being
able to re-use said object can save us an extra SQL query.
2015-10-15 12:05:01 +02:00
Jan-Gerd Tenberge 3ef71fa4fb Add support for HiDPI displays in gravatar service 2015-09-26 20:53:16 +02:00
Robert Speicher 42b643f057 Fix ApplicationHelper specs
There were several specs that were failing when run by themselves.

- Use the `helper` object, as per RSpec 3 standards
- Use `assign` to assign instance variables that helpers expect
- Add `StubConfiguration` support module
2015-06-30 17:47:53 -04:00
Stan Hu fe94254571 Fix avatar tests to use banana_sample.gif since SVG is not supported 2015-06-22 12:04:07 -07:00
Dmitriy Zaporozhets 595b3323a8 Merge branch 'rs-rspec3' into 'master'
RSpec3

Upgrades rspec to 3.3.0, we're now up-to-date! 🎉

See merge request !831
2015-06-22 13:15:27 +00:00
Dmitriy Zaporozhets 6c4d48b8b9
Merge branch 'rs-remove-link-to-override'
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Conflicts:
	spec/helpers/application_helper_spec.rb
2015-06-22 12:26:41 +02:00
Robert Speicher 5a9ede4721 Update mock and stub syntax for specs 2015-06-22 12:13:46 +02:00
Robert Speicher ff27747ec7 Fix timezone-based time_ago_with_tooltip spec failures 2015-06-19 16:49:52 -04:00
Robert Speicher 54365ecc7a Remove overridden `link_to` helper
The purpose for this override is now handled by `ExternalLinkFilter`.
2015-06-17 17:23:16 -04:00
Robert Speicher 8c8cd8be43 Update time_ago_with_tooltip helper
Minor refactoring, add specs, changes arguments to use keywords.
2015-06-17 16:37:10 -04:00