@@ -198,7 +198,27 @@ public void FormClearsOnCancel()
198198 var data = PrepareTestData ( "octokit.net" , "shana" , "master" , "octokit" , "notmaster" , "origin" , true , true ) ;
199199 var prservice = new PullRequestService ( data . GitClient , data . GitService , data . ServiceProvider . GetOperatingSystem ( ) , Substitute . For < IUsageTracker > ( ) ) ;
200200 var vm = new PullRequestCreationViewModel ( data . RepositoryHost , data . ActiveRepo , prservice , data . NotificationService ) ;
201+ vm . PRTitle = "a title" ;
202+ vm . Description = "a description" ;
201203 vm . CancelCommand . ExecuteAsync ( ) ;
202- Assert . Equal ( vm . TargetBranch . Name , "master" ) ;
204+
205+ Assert . Equal ( "master" , vm . TargetBranch . Name ) ;
206+ Assert . Equal ( string . Empty , vm . PRTitle ) ;
207+ Assert . Equal ( string . Empty , vm . Description ) ;
208+ }
209+
210+ [ Fact ]
211+ public void FormClearsOnCreation ( )
212+ {
213+ var data = PrepareTestData ( "octokit.net" , "shana" , "master" , "octokit" , "notmaster" , "origin" , true , true ) ;
214+ var prservice = new PullRequestService ( data . GitClient , data . GitService , data . ServiceProvider . GetOperatingSystem ( ) , Substitute . For < IUsageTracker > ( ) ) ;
215+ var vm = new PullRequestCreationViewModel ( data . RepositoryHost , data . ActiveRepo , prservice , data . NotificationService ) ;
216+ vm . PRTitle = "a title" ;
217+ vm . Description = "a description" ;
218+ vm . CreatePullRequest . ExecuteAsync ( ) ;
219+
220+ Assert . Equal ( "master" , vm . TargetBranch . Name ) ;
221+ Assert . Equal ( string . Empty , vm . PRTitle ) ;
222+ Assert . Equal ( string . Empty , vm . Description ) ;
203223 }
204224}
0 commit comments