Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Unified Diff: ios/chrome/browser/payments/cells/payments_text_item_unittest.mm

Issue 2821043002: [Payment Request] Adds a secondary text label to PaymentsTextCell (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/payments/cells/payments_text_item_unittest.mm
diff --git a/ios/chrome/browser/payments/cells/payments_text_item_unittest.mm b/ios/chrome/browser/payments/cells/payments_text_item_unittest.mm
index 64f66dc0bc3255a7390cd5af4e09add3972aba0b..9c4028023143a771a3544442cbecbf24be40c3d0 100644
--- a/ios/chrome/browser/payments/cells/payments_text_item_unittest.mm
+++ b/ios/chrome/browser/payments/cells/payments_text_item_unittest.mm
@@ -19,10 +19,12 @@ namespace {
TEST(PaymentRequestPaymentsTextItemTest, TextLabelAndImage) {
PaymentsTextItem* item = [[PaymentsTextItem alloc] initWithType:0];
- NSString* text = @"Lorem ipsum dolor sit amet";
+ NSString* text = @"Lorem ipsum";
+ NSString* detailText = @"Dolor sit amet";
UIImage* image = ios_internal::CollectionViewTestImage();
item.text = text;
+ item.detailText = detailText;
item.image = image;
id cell = [[[item cellClass] alloc] init];
@@ -30,10 +32,12 @@ TEST(PaymentRequestPaymentsTextItemTest, TextLabelAndImage) {
PaymentsTextCell* paymentsTextCell = cell;
EXPECT_FALSE(paymentsTextCell.textLabel.text);
+ EXPECT_FALSE(paymentsTextCell.detailTextLabel.text);
EXPECT_FALSE(paymentsTextCell.imageView.image);
[item configureCell:paymentsTextCell];
EXPECT_NSEQ(text, paymentsTextCell.textLabel.text);
+ EXPECT_NSEQ(detailText, paymentsTextCell.detailTextLabel.text);
EXPECT_NSEQ(image, paymentsTextCell.imageView.image);
}

Powered by Google App Engine
This is Rietveld 408576698