Explore Help
Sign In
baarkerlounger
/
submit-social-housing-lettings-and-sales-data
mirror of https://github.com/communitiesuk/submit-social-housing-lettings-and-sales-data.git
1
0
Fork
You've already forked submit-social-housing-lettings-and-sales-data
0
Code Issues Projects Releases Wiki Activity
Submit social housing lettings and sales data (CORE)
core
2536 Commits
235 Branches
272 Tags
76 MiB
Tree: 3f4782d87a
submit-social-housing-letti.../spec/support/controller_macros.rb

10 lines
192 B
Raw Normal View History Unescape Escape

Add devise gem and a first test for user login Devise is a commonly used gem for user authentication and management. Using rails generators and Devise allows us to get a lot of boilerplate code for user authentication and management and means we don't have to revinvent the wheel. Styling will need to be done for the necessary pages and there are likely to be bits of generated code that can be deleted. This will act as a starting point to be built up from using TDD.
3 years ago
module ControllerMacros
def login_user
Rubocop rspec fixes (#264)
3 years ago
before do
Add devise gem and a first test for user login Devise is a commonly used gem for user authentication and management. Using rails generators and Devise allows us to get a lot of boilerplate code for user authentication and management and means we don't have to revinvent the wheel. Styling will need to be done for the necessary pages and there are likely to be bits of generated code that can be deleted. This will act as a starting point to be built up from using TDD.
3 years ago
@request.env["devise.mapping"] = Devise.mappings[:user]
user = FactoryBot.create(:user)
sign_in user
end
end
end
Powered by Gitea Version: 1.16.9 Page: 768ms Template: 90ms
English
bahasa Indonesia Deutsch English español français italiano latviešu magyar nyelv Nederlands polski Português de Portugal português do Brasil suomi svenska Türkçe čeština ελληνικά български русский српски Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API Website Go1.18.3