diff options
| author | Ciro Santillli <ciro.santilli@gmail.com> | 2014-02-20 15:09:30 +0100 |
|---|---|---|
| committer | Ciro Santillli <ciro.santilli@gmail.com> | 2014-02-23 09:47:52 +0100 |
| commit | 90bdcac6b17c0da762959dcfae3521f3be4606b7 (patch) | |
| tree | b4b561f70f4ae53a84baf7f086c2221a2249aaa7 /spec | |
| parent | 499a118590e875596974e522aecf61bdc05fe0f2 (diff) | |
| download | gitlab-ce-90bdcac6b17c0da762959dcfae3521f3be4606b7.tar.gz | |
Blob and tree gfm links to anchors work.
Fixes #6046
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/factories.rb | 10 | ||||
| -rw-r--r-- | spec/helpers/gitlab_markdown_helper_spec.rb | 2 | ||||
| -rw-r--r-- | spec/seed_project.tar.gz | bin | 9833961 -> 9789938 bytes |
3 files changed, 11 insertions, 1 deletions
diff --git a/spec/factories.rb b/spec/factories.rb index 37436e53b95..7fc2b7c5e97 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -34,6 +34,16 @@ FactoryGirl.define do creator end + # Generates a test repository from the repository stored under `spec/seed_project.tar.gz`. + # Once you run `rake gitlab:setup`, you can see what the repository looks like under `tmp/repositories/gitlabhq`. + # In order to modify files in the repository, you must untar the seed, modify and remake the tar. + # Before recompressing, do not forget to `git checkout master`. + # After recompressing, you need to run `RAILS_ENV=test bundle exec rake gitlab:setup` to regenerate the seeds under tmp. + # + # If you want to modify the repository only for an specific type of tests, e.g., markdown tests, + # consider using a feature branch to reduce the chances of collision with other tests. + # Create a new commit, and use the same commit message that you will use for the change in the main repo. + # Changing the commig message and SHA of branch `master` may break tests. factory :project, parent: :empty_project do path { 'gitlabhq' } diff --git a/spec/helpers/gitlab_markdown_helper_spec.rb b/spec/helpers/gitlab_markdown_helper_spec.rb index a445c18f009..7e98b7944f1 100644 --- a/spec/helpers/gitlab_markdown_helper_spec.rb +++ b/spec/helpers/gitlab_markdown_helper_spec.rb @@ -454,7 +454,7 @@ describe GitlabMarkdownHelper do it "should handle relative urls in reference links for a directory in master" do actual = "[GitLab API doc directory][GitLab readmes]\n [GitLab readmes]: doc/api/\n" - expected = "<p><a href=\"/#{project.path_with_namespace}/tree/master/doc/api/\">GitLab API doc directory</a></p>\n" + expected = "<p><a href=\"/#{project.path_with_namespace}/tree/master/doc/api\">GitLab API doc directory</a></p>\n" markdown(actual).should match(expected) end diff --git a/spec/seed_project.tar.gz b/spec/seed_project.tar.gz Binary files differindex ee8c3f23c70..92b9587e3f7 100644 --- a/spec/seed_project.tar.gz +++ b/spec/seed_project.tar.gz |
