Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot throw exception on DocumentReference.get() call (#get) #272

Closed
emmett-deen opened this issue Oct 4, 2023 · 1 comment · Fixed by #275
Closed

Cannot throw exception on DocumentReference.get() call (#get) #272

emmett-deen opened this issue Oct 4, 2023 · 1 comment · Fixed by #275

Comments

@emmett-deen
Copy link

Using this basic sample code below, no exception is thrown. Using the same code as below for testing #set seems to work fine. What is it that I am missing here?

test('firestore get exception', () async {
      whenCalling(Invocation.method(#get, [], {}))
          .on(firestore.collection('test_collection').doc('test_doc'))
          .thenThrow(FirebaseException(plugin: 'test', message: 'test'));

      await firestore.collection('test_collection').doc('test_doc').get();
    });
@atn832
Copy link
Owner

atn832 commented Oct 24, 2023

@mrunix00 contributed a PR that fixes this issue. You can get it with version 2.4.3. https://pub.dev/packages/fake_cloud_firestore/changelog#243.

@atn832 atn832 closed this as completed Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants