<commit_before>require 'test_helper'

module Shadmin
	class PasswordsControllerTest < ActionController::TestCase
		def setup
			@admin = create(:admin)	
			@request.env["devise.mapping"] = Devise.mappings[:admin]
		end

		def test_new_action_template_layout
			sign_out @admin
			get :new, use_route: :shadmin
			assert_response :success
			assert_template layout: 'shadmin/sessions'
			assert_template 'shadmin/passwords/new'
		end

		def test_edit_action_template_layout
			sign_in @admin
			get :edit, use_route: :shadmin
			# assert_response :success
			assert_template layout: 'shadmin/sessions'
			assert_template 'shadmin/passwords/edit'
		end
	end
end<commit_msg>Assert correct views are rendered for passwords_controller actions<commit_after>require 'test_helper'

module Shadmin
	class PasswordsControllerTest < ActionController::TestCase
		def setup
			@admin = create(:admin)	
			@request.env["devise.mapping"] = Devise.mappings[:admin]
		end

		def test_new_action_template_layout
			sign_out @admin
			get :new, use_route: :shadmin
			assert_response :success
			assert_template layout: 'shadmin/sessions'
			assert_template 'shadmin/passwords/new'
		end

		def test_edit_action_template_layout
			sign_out @admin
			get :edit, { reset_password_token: '<PASSWORD>' }, use_route: :shadmin
			assert_response :success
			assert_template layout: 'shadmin/sessions'
			assert_template 'shadmin/passwords/edit'
		end
	end
end
{'fraction_non_alphanumeric': 0.0801952580195258, 'fraction_numerical': 0.0, 'mean_word_length': 5.00418410041841, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '132059', 'n_tokens_mistral': 516, 'n_tokens_neox': 450, 'n_words': 104}