mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-31 06:43:56 +01:00 
			
		
		
		
	* Fixed #4906 : Peer review: "thank the contributor" should show snackbar instead of notification * changes the snackbar to toast * added the tests * minor changes * minor changes - 2
This commit is contained in:
		
							parent
							
								
									11bc72c514
								
							
						
					
					
						commit
						1ae013d2b3
					
				
					 2 changed files with 31 additions and 12 deletions
				
			
		|  | @ -144,8 +144,23 @@ class ReviewControllerTest { | |||
|                 R.string.send_thank_toast, media.displayTitle | ||||
|             ) | ||||
|         ) | ||||
| 
 | ||||
|         val method: Method = ReviewController::class.java.getDeclaredMethod( | ||||
|             "displayThanksToast", Context::class.java, Boolean::class.java | ||||
|         ) | ||||
| 
 | ||||
|         method.isAccessible = true | ||||
|         method.invoke(controller,context,true) | ||||
| 
 | ||||
|         assertEquals( | ||||
|             ShadowToast.getTextOfLatestToast().toString(), | ||||
|             context.getString( | ||||
|                 R.string.send_thank_success_message, media.displayTitle | ||||
|             ) | ||||
|         ) | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     @Test | ||||
|     fun testSendThanksCaseNull() { | ||||
|         shadowOf(Looper.getMainLooper()).idle() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Arin Modi
						Arin Modi