-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
FIRStorageReference *ref = [[FIRStorage storage].reference child:path]; | ||
[ref updateMetadata:[self buildMetadataFromDictionary:metadataDictionary] | ||
completion:^(FIRStorageMetadata *metadata, NSError *error) { | ||
if (error != nil) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit] Invert condition?
}); | ||
|
||
test('invokes correct method', () async { | ||
await ref.getMetadata(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should call updateMetadata
and try to change something.
@@ -69,6 +69,15 @@ class StorageReference { | |||
})); | |||
} | |||
|
|||
/// Updates the metadata associated with this [StorageReference]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please document what the method returns.
}); | ||
|
||
test('returns correct result', () async { | ||
expect((await ref.getMetadata()).name, 'image.jpg'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should call updateMetadata
and hopefully reflect that something was changed.
8d0df85
to
d649089
Compare
d649089
to
e16ec70
Compare
/// Updates the metadata associated with this [StorageReference]. | ||
/// | ||
/// Returns a [Future] that will complete to the updated [StorageMetadata]. | ||
Future<StorageMetadata> updateMetadata(StorageMetadata metadata) async { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method ignores fields of metadata
that cannot be set by the public StorageMetadata
constructor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.