fixed some rubocop warnings

This commit is contained in:
James Lopez 2016-03-21 17:29:19 +01:00
parent bd8a77674f
commit dff4050f1d
5 changed files with 6 additions and 5 deletions

View file

@ -12,7 +12,7 @@ require 'file_size_validator'
class ProjectImportData < ActiveRecord::Base
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

View file

@ -34,4 +34,4 @@ module Gitlab
safe_url
end
end
end
end

View file

@ -2,4 +2,4 @@ FactoryGirl.define do
factory :project_import_data, class: ProjectImportData do
data "test"
end
end
end

View file

@ -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.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)
end
end

View file

@ -2,7 +2,8 @@ require 'spec_helper'
describe Gitlab::GithubImport::WikiFormatter, lib: true 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')
end