Skip to content
Snippets Groups Projects
Commit dff4050f authored by James Lopez's avatar James Lopez
Browse files

fixed some rubocop warnings

parent bd8a7767
No related branches found
No related tags found
1 merge request!3066Fix for import_url fields on projects containing third-party credentials
Pipeline #
Loading
@@ -12,7 +12,7 @@ require 'file_size_validator'
Loading
@@ -12,7 +12,7 @@ require 'file_size_validator'
   
class ProjectImportData < ActiveRecord::Base class ProjectImportData < ActiveRecord::Base
belongs_to :project belongs_to :project
attr_encrypted :credentials, key: Gitlab::Application.secrets.db_key_base, marshal: true, encode: true, :mode => :per_attribute_iv_and_salt attr_encrypted :credentials, key: Gitlab::Application.secrets.db_key_base, marshal: true, encode: true, mode: :per_attribute_iv_and_salt
   
serialize :data, JSON serialize :data, JSON
   
Loading
Loading
Loading
@@ -28,7 +28,7 @@ describe Gitlab::GithubImport::ProjectCreator, lib: true do
Loading
@@ -28,7 +28,7 @@ describe Gitlab::GithubImport::ProjectCreator, lib: true do
   
expect(project.import_url).to eq("https://asdffg@gitlab.com/asd/vim.git") expect(project.import_url).to eq("https://asdffg@gitlab.com/asd/vim.git")
expect(project.safe_import_url).to eq("https://*****@gitlab.com/asd/vim.git") expect(project.safe_import_url).to eq("https://*****@gitlab.com/asd/vim.git")
expect(project.import_data.credentials).to eq(:user => "asdffg", :password => nil) expect(project.import_data.credentials).to eq(user: "asdffg", password: nil)
expect(project.visibility_level).to eq(Gitlab::VisibilityLevel::PRIVATE) expect(project.visibility_level).to eq(Gitlab::VisibilityLevel::PRIVATE)
end end
end end
Loading
@@ -2,7 +2,8 @@ require 'spec_helper'
Loading
@@ -2,7 +2,8 @@ require 'spec_helper'
   
describe Gitlab::GithubImport::WikiFormatter, lib: true do describe Gitlab::GithubImport::WikiFormatter, lib: true do
let(:project) do let(:project) do
create(:project, namespace: create(:namespace, path: 'gitlabhq'), create(:project,
namespace: create(:namespace, path: 'gitlabhq'),
import_url: 'https://xxx@github.com/gitlabhq/sample.gitlabhq.git') import_url: 'https://xxx@github.com/gitlabhq/sample.gitlabhq.git')
end end
   
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment