I am trying to update some older test code to remove seeallData=true. I am getting a page error testing a quote controller extension that creates a new quote.
System.AssertException: Assertion Failed: No error message must be displayed(ApexPages.Message["Quoting cannot proceed with missing or inactive Pricing Type/Pricebook."]): Expected: true, Actual: false
Here are snippets of the code which mostly I inherited and am working to clean-up :-)
Opportunity was created in a setup method using the standard pricebook id.
quote = new Quote(Name='test quote', OpportunityId=opp.Id, pricebook2id=Test.getStandardPricebookId());
Test.startTest();
Test.setCurrentPageReference(Page.NewQuote);
ApexPages.currentPage().getParameters().put('oppId', opp.Id);
stdCont = new ApexPages.Standardcontroller(quote);
contExt = new NewQuoteQuoteContExt(stdCont);
Test.stopTest();
System.assertEquals(true, contExt.isValid, 'No error message must be displayed' + Apexpages.getMessages());