* Prepare to drop profile columns from user * Update code and factory * Also remove unused constant * Move validation from user to profile * Remove Profiles::ExtractData service object * Add more comments * Simplify sameAs attribute generation * Obey me machine, I am your master * Fix condition order in guard clause * Temporarily disable callback * Fix specs * Reduce usage of Profile#refresh_attributes! * Remove leftover comment * Handle social media links differently * More spec fixes * Fix specs for admin profile fields controller * Fix specs after merge * Fix remaining specs * Update user show request spec * Add comment for follow_hiring_tag * Only save profile when user is valid * Fix seeds.rb for profile fields * Switch from before_save to after_save * Undo unrelated formattin change * Update spec/fixtures/files/profile_fields.csv Co-authored-by: Molly Struve <mollylbs@gmail.com> * Remove data update script and spec * Fix spec * Fix typo in comment * Fix typo in comment * Move article resave logic to service object * Move profile field creation to before(:suite) * Refactor error handling in Profiles::Update * Fix Profiles::Update specs and refactor * Temporarily disable spec * Add ProfileValidator * Clean up * Move DB ready check into app/lib * Refresh attributes after importing from CSV * Fix specs * Remove unused file * A girl has no name. A profile neither. * Fix specs * Add responds_to? check * Spec fix * Add name to user fields in profile settings page Co-authored-by: Molly Struve <mollylbs@gmail.com>
31 lines
1 KiB
Ruby
31 lines
1 KiB
Ruby
FactoryBot.define do
|
|
factory :profile do
|
|
user { association(:user, _skip_creating_profile: true) }
|
|
end
|
|
|
|
trait :with_DEV_info do
|
|
data do
|
|
{
|
|
behance_url: "www.behance.net/#{user.username}",
|
|
currently_hacking_on: "JSON-LD",
|
|
currently_learning: "Preact",
|
|
dribbble_url: "www.dribbble.com/example",
|
|
education: "DEV University",
|
|
employer_name: "DEV",
|
|
employer_url: "http://dev.to",
|
|
employment_title: "Software Engineer",
|
|
facebook_url: "www.facebook.com/example",
|
|
gitlab_url: "www.gitlab.com/example",
|
|
instagram_url: "www.instagram.com/example",
|
|
linkedin_url: "www.linkedin.com/company/example",
|
|
mastodon_url: "https://mastodon.social/@test",
|
|
medium_url: "www.medium.com/example",
|
|
skills_languages: "Ruby",
|
|
stackoverflow_url: "www.stackoverflow.com/example",
|
|
youtube_url: "https://youtube.com/example",
|
|
summary: "I do things with computers",
|
|
website_url: "http://example.com"
|
|
}
|
|
end
|
|
end
|
|
end
|