debian-mirror-gitlab/debian/tests/todo/helpers
Praveen Arimbrathodiyil 86f3a872cb helpers tests failed
2016-09-16 18:06:57 +05:30

233 lines
18 KiB
Text

$ DB=postgres sudo -u gitlab -E -H bundle exec rspec spec/helpers/
Error deleting useless .secret file: Permission denied @ unlink_internal - /usr/share/gitlab/.secret
DEPRECATION WARNING: Sprockets method `register_engine` is deprecated.
Please register a mime type using `register_mime_type` then
use `register_compressor` or `register_transformer`.
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
(called from block (2 levels) in <class:Railtie> at /usr/lib/ruby/vendor_ruby/sass/rails/railtie.rb:57)
DEPRECATION WARNING: Sprockets method `register_engine` is deprecated.
Please register a mime type using `register_mime_type` then
use `register_compressor` or `register_transformer`.
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
(called from block (2 levels) in <class:Railtie> at /usr/lib/ruby/vendor_ruby/sass/rails/railtie.rb:58)
......FF....................................................................................................F...............................................................................................................F.FF.FF.FF.......................FF.......................................................
Failures:
1) ApplicationHelper project_icon returns an url for the avatar
Failure/Error:
expect(helper.project_icon("#{project.namespace.to_param}/#{project.to_param}").to_s).
to eq "<img src=\"#{avatar_url}\" alt=\"Banana sample\" />"
expected: "<img src=\"http://localhost/uploads/project/avatar/1/banana_sample.gif\" alt=\"Banana sample\" />"
got: "<img src=\"http://nishumbha/uploads/project/avatar/1/banana_sample.gif\" alt=\"Banana sample\" />"
(compared using ==)
# ./spec/helpers/application_helper_spec.rb:61:in `block (3 levels) in <top (required)>'
2) ApplicationHelper project_icon gives uploaded icon when present
Failure/Error:
expect(helper.project_icon("#{project.namespace.to_param}/#{project.to_param}").to_s).to match(
image_tag(avatar_url))
expected "<img src=\"http://nishumbha/namespace2/gitlabhq/avatar\" alt=\"Avatar\" />" to match "<img src=\"http://localhost/namespace2/gitlabhq/avatar\" alt=\"Avatar\" />"
# ./spec/helpers/application_helper_spec.rb:71:in `block (3 levels) in <top (required)>'
3) GitlabMarkdownHelper#link_to_gfm replaces commit message with emoji to link
Failure/Error:
expect(actual).
to eq %Q(<img class="emoji" title=":book:" alt=":book:" src="http://localhost/assets/1F4D6.png" height="20" width="20" align="absmiddle"><a href="/foo">Book</a>)
expected: "<img class=\"emoji\" title=\":book:\" alt=\":book:\" src=\"http://localhost/assets/1F4D6.png\" height=\"20\" width=\"20\" align=\"absmiddle\"><a href=\"/foo\">Book</a>"
got: "<img class=\"emoji\" title=\":book:\" alt=\":book:\" src=\"http://nishumbha/assets/1F4D6-9d912a9d1bb10dc7f2645b345ed09e90461e83df0de275acb806f1f75cef1fcf.png\" height=\"20\" width=\"20\" align=\"absmiddle\"><a href=\"/foo\">Book</a>"
(compared using ==)
# ./spec/helpers/gitlab_markdown_helper_spec.rb:115:in `block (3 levels) in <top (required)>'
4) PageLayoutHelper page_image defaults to the GitLab logo
Failure/Error: expect(helper.page_image).to end_with 'assets/gitlab_logo.png'
expected "http://test.host/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" to end with "assets/gitlab_logo.png"
# ./spec/helpers/page_layout_helper_spec.rb:45:in `block (3 levels) in <top (required)>'
5) PageLayoutHelper page_image with @project assigned falls back to the default when avatar_url is nil
Failure/Error: expect(helper.page_image).to end_with 'assets/gitlab_logo.png'
expected "http://test.host/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" to end with "assets/gitlab_logo.png"
# ./spec/helpers/page_layout_helper_spec.rb:61:in `block (5 levels) in <top (required)>'
6) PageLayoutHelper page_image with no assignments falls back to the default
Failure/Error: expect(helper.page_image).to end_with 'assets/gitlab_logo.png'
expected "http://test.host/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" to end with "assets/gitlab_logo.png"
# ./spec/helpers/page_layout_helper_spec.rb:67:in `block (5 levels) in <top (required)>'
7) PageLayoutHelper page_image with @user assigned falls back to the default when avatar_url is nil
Failure/Error: expect(helper.page_image).to end_with 'assets/gitlab_logo.png'
expected "http://test.host/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" to end with "assets/gitlab_logo.png"
# ./spec/helpers/page_layout_helper_spec.rb:61:in `block (5 levels) in <top (required)>'
8) PageLayoutHelper page_image with no assignments falls back to the default
Failure/Error: expect(helper.page_image).to end_with 'assets/gitlab_logo.png'
expected "http://test.host/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" to end with "assets/gitlab_logo.png"
# ./spec/helpers/page_layout_helper_spec.rb:67:in `block (5 levels) in <top (required)>'
9) PageLayoutHelper page_image with @group assigned falls back to the default when avatar_url is nil
Failure/Error: expect(helper.page_image).to end_with 'assets/gitlab_logo.png'
expected "http://test.host/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" to end with "assets/gitlab_logo.png"
# ./spec/helpers/page_layout_helper_spec.rb:61:in `block (5 levels) in <top (required)>'
10) PageLayoutHelper page_image with no assignments falls back to the default
Failure/Error: expect(helper.page_image).to end_with 'assets/gitlab_logo.png'
expected "http://test.host/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" to end with "assets/gitlab_logo.png"
# ./spec/helpers/page_layout_helper_spec.rb:67:in `block (5 levels) in <top (required)>'
11) ProjectsHelper#license_short_name when project.repository has a license_key returns the nickname of the license if present
Failure/Error: license.nickname || license.name
Licensee::InvalidLicense:
'agpl-3.0' is not a valid license key
# ./app/helpers/projects_helper.rb:116:in `license_short_name'
# ./spec/helpers/projects_helper_spec.rb:106:in `block (4 levels) in <top (required)>'
12) ProjectsHelper#license_short_name when project.repository has a license_key returns the name of the license if nickname is not present
Failure/Error: license.nickname || license.name
Licensee::InvalidLicense:
'mit' is not a valid license key
# ./app/helpers/projects_helper.rb:116:in `license_short_name'
# ./spec/helpers/projects_helper_spec.rb:112:in `block (4 levels) in <top (required)>'
Finished in 1 minute 41.2 seconds (files took 9.4 seconds to load)
310 examples, 12 failures
Failed examples:
rspec ./spec/helpers/application_helper_spec.rb:57 # ApplicationHelper project_icon returns an url for the avatar
rspec ./spec/helpers/application_helper_spec.rb:65 # ApplicationHelper project_icon gives uploaded icon when present
rspec ./spec/helpers/gitlab_markdown_helper_spec.rb:113 # GitlabMarkdownHelper#link_to_gfm replaces commit message with emoji to link
rspec ./spec/helpers/page_layout_helper_spec.rb:44 # PageLayoutHelper page_image defaults to the GitLab logo
rspec ./spec/helpers/page_layout_helper_spec.rb[1:2:2:2] # PageLayoutHelper page_image with @project assigned falls back to the default when avatar_url is nil
rspec ./spec/helpers/page_layout_helper_spec.rb[1:2:3:1] # PageLayoutHelper page_image with no assignments falls back to the default
rspec ./spec/helpers/page_layout_helper_spec.rb[1:2:4:2] # PageLayoutHelper page_image with @user assigned falls back to the default when avatar_url is nil
rspec ./spec/helpers/page_layout_helper_spec.rb[1:2:5:1] # PageLayoutHelper page_image with no assignments falls back to the default
rspec ./spec/helpers/page_layout_helper_spec.rb[1:2:6:2] # PageLayoutHelper page_image with @group assigned falls back to the default when avatar_url is nil
rspec ./spec/helpers/page_layout_helper_spec.rb[1:2:7:1] # PageLayoutHelper page_image with no assignments falls back to the default
rspec ./spec/helpers/projects_helper_spec.rb:103 # ProjectsHelper#license_short_name when project.repository has a license_key returns the nickname of the license if present
rspec ./spec/helpers/projects_helper_spec.rb:109 # ProjectsHelper#license_short_name when project.repository has a license_key returns the name of the license if nickname is not present
pravi@nishumbha:/usr/share/gitlab$
$ DB=postgres sudo -u gitlab -E -H bundle exec rspec spec/helpers/
Error deleting useless .secret file: Permission denied @ unlink_internal - /usr/share/gitlab/.secret
DEPRECATION WARNING: Sprockets method `register_engine` is deprecated.
Please register a mime type using `register_mime_type` then
use `register_compressor` or `register_transformer`.
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
(called from block (2 levels) in <class:Railtie> at /usr/lib/ruby/vendor_ruby/sass/rails/railtie.rb:57)
DEPRECATION WARNING: Sprockets method `register_engine` is deprecated.
Please register a mime type using `register_mime_type` then
use `register_compressor` or `register_transformer`.
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
(called from block (2 levels) in <class:Railtie> at /usr/lib/ruby/vendor_ruby/sass/rails/railtie.rb:58)
......FF....................................................................................................F...............................................................................................................F.FF.FF.FF.......................FF.......................................................
Failures:
1) ApplicationHelper project_icon returns an url for the avatar
Failure/Error:
expect(helper.project_icon("#{project.namespace.to_param}/#{project.to_param}").to_s).
to eq "<img src=\"#{avatar_url}\" alt=\"Banana sample\" />"
expected: "<img src=\"http://localhost/uploads/project/avatar/1/banana_sample.gif\" alt=\"Banana sample\" />"
got: "<img src=\"http://nishumbha/uploads/project/avatar/1/banana_sample.gif\" alt=\"Banana sample\" />"
(compared using ==)
# ./spec/helpers/application_helper_spec.rb:61:in `block (3 levels) in <top (required)>'
2) ApplicationHelper project_icon gives uploaded icon when present
Failure/Error:
expect(helper.project_icon("#{project.namespace.to_param}/#{project.to_param}").to_s).to match(
image_tag(avatar_url))
expected "<img src=\"http://nishumbha/namespace2/gitlabhq/avatar\" alt=\"Avatar\" />" to match "<img src=\"http://localhost/namespace2/gitlabhq/avatar\" alt=\"Avatar\" />"
# ./spec/helpers/application_helper_spec.rb:71:in `block (3 levels) in <top (required)>'
3) GitlabMarkdownHelper#link_to_gfm replaces commit message with emoji to link
Failure/Error:
expect(actual).
to eq %Q(<img class="emoji" title=":book:" alt=":book:" src="http://localhost/assets/1F4D6.png" height="20" width="20" align="absmiddle"><a href="/foo">Book</a>)
expected: "<img class=\"emoji\" title=\":book:\" alt=\":book:\" src=\"http://localhost/assets/1F4D6.png\" height=\"20\" width=\"20\" align=\"absmiddle\"><a href=\"/foo\">Book</a>"
got: "<img class=\"emoji\" title=\":book:\" alt=\":book:\" src=\"http://nishumbha/assets/1F4D6-9d912a9d1bb10dc7f2645b345ed09e90461e83df0de275acb806f1f75cef1fcf.png\" height=\"20\" width=\"20\" align=\"absmiddle\"><a href=\"/foo\">Book</a>"
(compared using ==)
# ./spec/helpers/gitlab_markdown_helper_spec.rb:115:in `block (3 levels) in <top (required)>'
4) PageLayoutHelper page_image defaults to the GitLab logo
Failure/Error: expect(helper.page_image).to end_with 'assets/gitlab_logo.png'
expected "http://test.host/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" to end with "assets/gitlab_logo.png"
# ./spec/helpers/page_layout_helper_spec.rb:45:in `block (3 levels) in <top (required)>'
5) PageLayoutHelper page_image with @project assigned falls back to the default when avatar_url is nil
Failure/Error: expect(helper.page_image).to end_with 'assets/gitlab_logo.png'
expected "http://test.host/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" to end with "assets/gitlab_logo.png"
# ./spec/helpers/page_layout_helper_spec.rb:61:in `block (5 levels) in <top (required)>'
6) PageLayoutHelper page_image with no assignments falls back to the default
Failure/Error: expect(helper.page_image).to end_with 'assets/gitlab_logo.png'
expected "http://test.host/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" to end with "assets/gitlab_logo.png"
# ./spec/helpers/page_layout_helper_spec.rb:67:in `block (5 levels) in <top (required)>'
7) PageLayoutHelper page_image with @user assigned falls back to the default when avatar_url is nil
Failure/Error: expect(helper.page_image).to end_with 'assets/gitlab_logo.png'
expected "http://test.host/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" to end with "assets/gitlab_logo.png"
# ./spec/helpers/page_layout_helper_spec.rb:61:in `block (5 levels) in <top (required)>'
8) PageLayoutHelper page_image with no assignments falls back to the default
Failure/Error: expect(helper.page_image).to end_with 'assets/gitlab_logo.png'
expected "http://test.host/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" to end with "assets/gitlab_logo.png"
# ./spec/helpers/page_layout_helper_spec.rb:67:in `block (5 levels) in <top (required)>'
9) PageLayoutHelper page_image with @group assigned falls back to the default when avatar_url is nil
Failure/Error: expect(helper.page_image).to end_with 'assets/gitlab_logo.png'
expected "http://test.host/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" to end with "assets/gitlab_logo.png"
# ./spec/helpers/page_layout_helper_spec.rb:61:in `block (5 levels) in <top (required)>'
10) PageLayoutHelper page_image with no assignments falls back to the default
Failure/Error: expect(helper.page_image).to end_with 'assets/gitlab_logo.png'
expected "http://test.host/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" to end with "assets/gitlab_logo.png"
# ./spec/helpers/page_layout_helper_spec.rb:67:in `block (5 levels) in <top (required)>'
11) ProjectsHelper#license_short_name when project.repository has a license_key returns the nickname of the license if present
Failure/Error: license.nickname || license.name
Licensee::InvalidLicense:
'agpl-3.0' is not a valid license key
# ./app/helpers/projects_helper.rb:116:in `license_short_name'
# ./spec/helpers/projects_helper_spec.rb:106:in `block (4 levels) in <top (required)>'
12) ProjectsHelper#license_short_name when project.repository has a license_key returns the name of the license if nickname is not present
Failure/Error: license.nickname || license.name
Licensee::InvalidLicense:
'mit' is not a valid license key
# ./app/helpers/projects_helper.rb:116:in `license_short_name'
# ./spec/helpers/projects_helper_spec.rb:112:in `block (4 levels) in <top (required)>'
Finished in 1 minute 41.2 seconds (files took 9.4 seconds to load)
310 examples, 12 failures
Failed examples:
rspec ./spec/helpers/application_helper_spec.rb:57 # ApplicationHelper project_icon returns an url for the avatar
rspec ./spec/helpers/application_helper_spec.rb:65 # ApplicationHelper project_icon gives uploaded icon when present
rspec ./spec/helpers/gitlab_markdown_helper_spec.rb:113 # GitlabMarkdownHelper#link_to_gfm replaces commit message with emoji to link
rspec ./spec/helpers/page_layout_helper_spec.rb:44 # PageLayoutHelper page_image defaults to the GitLab logo
rspec ./spec/helpers/page_layout_helper_spec.rb[1:2:2:2] # PageLayoutHelper page_image with @project assigned falls back to the default when avatar_url is nil
rspec ./spec/helpers/page_layout_helper_spec.rb[1:2:3:1] # PageLayoutHelper page_image with no assignments falls back to the default
rspec ./spec/helpers/page_layout_helper_spec.rb[1:2:4:2] # PageLayoutHelper page_image with @user assigned falls back to the default when avatar_url is nil
rspec ./spec/helpers/page_layout_helper_spec.rb[1:2:5:1] # PageLayoutHelper page_image with no assignments falls back to the default
rspec ./spec/helpers/page_layout_helper_spec.rb[1:2:6:2] # PageLayoutHelper page_image with @group assigned falls back to the default when avatar_url is nil
rspec ./spec/helpers/page_layout_helper_spec.rb[1:2:7:1] # PageLayoutHelper page_image with no assignments falls back to the default
rspec ./spec/helpers/projects_helper_spec.rb:103 # ProjectsHelper#license_short_name when project.repository has a license_key returns the nickname of the license if present
rspec ./spec/helpers/projects_helper_spec.rb:109 # ProjectsHelper#license_short_name when project.repository has a license_key returns the name of the license if nickname is not present
pravi@nishumbha:/usr/share/gitlab$