Welcome to mirror list, hosted at ThFree Co, Russian Federation.

snippet_helpers.rb « helpers « support « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1ec50bce0708c58522de20cd5f2dcca070a9dacc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

module SnippetHelpers
  def sign_in_as(user)
    sign_in(public_send(user)) if user
  end

  def snippet_blob_file(blob)
    {
      "path" => blob.path,
      "raw_url" => gitlab_raw_snippet_blob_url(blob.container, blob.path, host: 'localhost')
    }
  end
end