-
Notifications
You must be signed in to change notification settings - Fork 0
createProfileActivity: mock Authenticator #269
Conversation
@@ -69,9 +86,9 @@ class CreateProfileActivityTest { | |||
|
|||
val intent = Intent(ApplicationProvider.getApplicationContext(), CreateProfileActivity::class.java) | |||
intent.putExtra("email", mockEmail) | |||
intent.putExtra("isUnitTest", true) |
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.
Nooooo bye my friend isUnitTest, you had a great life 😂😂😂😂 !!!
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.
ahahahahahhahaa bye-bye and never come back please
/** | ||
* Getter for the current user ID | ||
*/ | ||
fun getCurrUID(): String { | ||
var uid = "" | ||
if (isLoggedIn()) { | ||
uid = FirebaseAuth.getInstance().currentUser!!.uid | ||
} | ||
return uid | ||
} |
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.
/** | |
* Getter for the current user ID | |
*/ | |
fun getCurrUID(): String { | |
var uid = "" | |
if (isLoggedIn()) { | |
uid = FirebaseAuth.getInstance().currentUser!!.uid | |
} | |
return uid | |
} |
See 40 lines above !!!
getCurrentUID() exactly the same 😂
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.
yes, but when you mock, you cant access one from the above
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.
I will mock others as well, and remove those from companion object. sounds good?
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.
Ohh okay I see, yes maybe removing the companion object may be a good idea because I find it weird otherwise to have two times the same code.
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.
It is... I decided to remove one by one, so it easier to check!
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.
I will remove these function on the next pr since there a lot of dependencies. My next pr (where these repetetive functions are removed) is almost done!
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.
Nice work! just left some comment above 😀
Code Climate has analyzed commit 317c9fc and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 28.5% (80% is the threshold). This pull request will bring the total coverage in the repository to 82.2% (0.1% change). View more on Code Climate. |
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.
As you are doing the commented update in the new PR:
#272
Approved!!
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
This PR mocks authenticator in the createProfileActivity.