File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -98,3 +98,10 @@ sample_enabled_2fa:
9898 is_admin : false
9999 is_moderator : false
100100 reputation : 1
101+
102+ sample_spammer :
103+ user : spammer
104+ community : sample
105+ is_admin : false
106+ is_moderator : false
107+ reputation : 1
Original file line number Diff line number Diff line change @@ -72,3 +72,7 @@ e2_ep_susp:
7272 is_suspended : true
7373 suspension_end : ~
7474 suspension_message : go away
75+
76+ e_sp :
77+ community_user : sample_spammer
78+ ability : unrestricted
Original file line number Diff line number Diff line change @@ -148,3 +148,18 @@ enabled_2fa:
148148 enabled_2fa : true
149149 two_factor_token : WT65ANYXBB2SBR7III7IVWNJDS4PQF2T
150150 backup_2fa_code : M8lENyehyCvo9F9MbyTl1aOL
151+
152+ spammer :
153+ email : spammer@example.com
154+ encrypted_password : ' $2a$11$roUHXKxecjyQ72Qn7DWs3.9eRCCoRn176kX/UNb/xiue3aGqf7xEW'
155+ profile : >
156+ Find the best spam on the network <a href="https://example.com">here</a>!
157+ The yummiest spam you've ever tasted.
158+ profile_markdown : >
159+ Find the best spam on the network [here](https://example.com)!
160+ The yummiest spam you've ever tasted.
161+ sign_in_count : 1
162+ username : BestSpamOnTheNet
163+ is_global_admin : false
164+ is_global_moderator : false
165+ confirmed_at : 2020-01-01T00:00:00.000000Z
Original file line number Diff line number Diff line change 22
33class PotentialSpamProfilesJobTest < ActiveJob ::TestCase
44 test 'should run job successfully' do
5+ unrestricted_id = abilities ( :unrestricted ) . internal_id
6+
7+ assert users ( :spammer ) . community_user . ability? ( unrestricted_id )
8+
59 perform_enqueued_jobs do
610 PotentialSpamProfilesJob . perform_later
711 end
12+
813 assert_performed_jobs 1
14+ assert_not users ( :spammer ) . community_user . ability? ( unrestricted_id )
915 end
1016end
You can’t perform that action at this time.
0 commit comments