mirror of
https://github.com/chenasraf/snpr.git
synced 2026-05-17 17:38:07 +00:00
Satisfy hound
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
FactoryBot.define do
|
||||
factory :fitbit_activity do
|
||||
steps 100
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
FactoryBot.define do
|
||||
factory :fitbit_sleep do
|
||||
minutes_asleep 480
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
FactoryBot.define do
|
||||
factory :genotype do
|
||||
genotype_file_name 'foo.txt'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
FactoryBot.define do
|
||||
factory :mendeley_paper do
|
||||
title 'Musterstudie'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
FactoryBot.define do
|
||||
factory :picture_phenotype do
|
||||
characteristic 'Eye color'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
FactoryBot.define do
|
||||
factory :snp_comment do
|
||||
comment_text 'This is a great SNP!'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
FactoryBot.define do
|
||||
factory :snpedia_paper do
|
||||
url 'http://www.snpedia.com/index.php/Rs1234(A;C)'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
FactoryBot.define do
|
||||
factory :snp do
|
||||
sequence(:name) { |i| "rs#{i}" }
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
FactoryBot.define do
|
||||
factory :user_achievement do
|
||||
end
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
FactoryBot.define do
|
||||
factory :user_phenotype do
|
||||
association :user
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
FactoryBot.define do
|
||||
factory :user_picture_phenotype do
|
||||
variation 'pink'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
FactoryBot.define do
|
||||
factory :user_snp do
|
||||
local_genotype 'AG'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
FactoryBot.define do
|
||||
factory :user do
|
||||
name 'Dogbert'
|
||||
|
||||
@@ -4,7 +4,7 @@ require_relative '../test_helper'
|
||||
class UsersControllerTest < ActionController::TestCase
|
||||
context "Users" do
|
||||
setup do
|
||||
@user = FactoryBot.create(:user, name: "The Dude")
|
||||
@user = FactoryBot.create(:user, name: 'The Dude')
|
||||
activate_authlogic
|
||||
assert_nil @controller.send(:current_user)
|
||||
Object.any_instance.stubs(:recaptcha_tags)
|
||||
@@ -81,7 +81,7 @@ class UsersControllerTest < ActionController::TestCase
|
||||
context "other users" do
|
||||
setup do
|
||||
@controller = UsersController.new
|
||||
@other_user = FactoryBot.create(:user, name: "The Nihilist")
|
||||
@other_user = FactoryBot.create(:user, name: 'The Nihilist')
|
||||
@session = UserSession.create(@other_user)
|
||||
assert_equal @other_user, @controller.send(:current_user)
|
||||
end
|
||||
|
||||
@@ -98,8 +98,8 @@ class MendeleySearchTest < ActiveSupport::TestCase
|
||||
|
||||
should "not update existing valid papers" do
|
||||
uuid = @document["uuid"]
|
||||
existing_mendeley_paper = FactoryBot.
|
||||
build_stubbed(:mendeley_paper, uuid: uuid, snps: [@snp])
|
||||
existing_mendeley_paper = FactoryBot
|
||||
.build_stubbed(:mendeley_paper, uuid: uuid, snps: [@snp])
|
||||
MendeleyPaper.expects(:find_or_initialize_by).with(uuid: uuid).
|
||||
returns(existing_mendeley_paper)
|
||||
MendeleyPaper.any_instance.expects(:save).never
|
||||
|
||||
Reference in New Issue
Block a user