Skip to content
Snippets Groups Projects
Commit 8fa619f2 authored by Jawnnypoo's avatar Jawnnypoo
Browse files

Account for null theme on user

parent 7613f6f1
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -22,9 +22,9 @@ To build, run the following.
```
 
## Contributing
Please fork this repository and contribute back! All Merge Requests should be made against the `develop` branch, as it is the active branch for development. Please make your best effort to break up commits as much as possible to improve the reviewing process.
Please fork this repository and contribute back! Please make your best effort to break up commits as much as possible to improve the reviewing process.
 
If you are making substantial changes, please refer to Commit 451's style [guidelines](https://github.com/Commit451/guidelines) for Android
If you are making substantial changes, please refer to Commit 451's style [guidelines](https://github.com/Commit451/guidelines) for Android/Kotlin
 
License
--------
Loading
Loading
Loading
Loading
@@ -14,6 +14,7 @@ repositories {
 
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'io.fabric'
 
def versionMajor = 2
Loading
Loading
@@ -98,7 +99,7 @@ android {
}
 
ext {
supportLibVersion = '26.0.2'
supportLibVersion = '26.1.0'
retrofitVersion = '2.3.0'
okHttpVersion = '3.9.0'
butterknifeVersion = '8.8.1'
Loading
Loading
@@ -106,7 +107,7 @@ ext {
reptarVersion = '2.5.1'
adapterLayout = '1.1.1'
materialDialogsVersion = '0.9.4.7'
leakCanaryVersion = '1.5'
leakCanaryVersion = '1.5.3'
addendumVersion = '1.4.0'
alakazamVersion = '1.0.1'
moshiVersion = '1.5.0'
Loading
Loading
@@ -154,7 +155,7 @@ dependencies {
implementation 'io.reactivex.rxjava2:rxjava:2.1.3'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
 
implementation 'com.trello.rxlifecycle2:rxlifecycle-components:2.1.0'
implementation 'com.trello.rxlifecycle2:rxlifecycle-components:2.2.0'
 
implementation "org.parceler:parceler-api:$parcelerVersion"
kapt "org.parceler:parceler:$parcelerVersion"
Loading
Loading
Loading
Loading
@@ -58,7 +58,7 @@ open class User {
@field:Json(name = "email")
var email: String? = null
@field:Json(name = "theme_id")
var themeId: Int = 0
var themeId: Int? = 0
@field:Json(name = "color_scheme_id")
var colorSchemeId: Int = 0
@field:Json(name = "projects_limit")
Loading
Loading
Loading
Loading
@@ -17,7 +17,7 @@ class ApiTests {
private val FAKE_GROUP_PROJECT_ID: Long = 376651
 
private var fakeProject: Project? = null
private var gitLab: GitLabService? = null
private lateinit var gitLab: GitLabService
 
@JvmStatic
@BeforeClass
Loading
Loading
@@ -26,7 +26,7 @@ class ApiTests {
 
gitLab = TestUtil.login()
 
val projectResponse = gitLab!!
val projectResponse = gitLab
.getProject(FAKE_GROUP_PROJECT_ID.toString())
.blockingGet()
assertNotNull(projectResponse)
Loading
Loading
@@ -37,7 +37,7 @@ class ApiTests {
 
@Test
fun getProjects() {
val projectsResponse = gitLab!!
val projectsResponse = gitLab
.getAllProjects()
.blockingGet()
TestUtil.assertRetrofitResponseSuccess(projectsResponse)
Loading
Loading
@@ -46,7 +46,7 @@ class ApiTests {
 
@Test
fun getGroups() {
val groupResponse = gitLab!!
val groupResponse = gitLab
.getGroups()
.blockingGet()
TestUtil.assertRetrofitResponseSuccess(groupResponse)
Loading
Loading
@@ -57,7 +57,7 @@ class ApiTests {
fun getGroupMembers() {
//GitLabService group id
val gitLabGroupId: Long = 9970
val groupResponse = gitLab!!
val groupResponse = gitLab
.getGroupMembers(gitLabGroupId)
.blockingGet()
TestUtil.assertRetrofitResponseSuccess(groupResponse)
Loading
Loading
@@ -67,7 +67,7 @@ class ApiTests {
@Test
fun getIssues() {
val defaultState = "opened"
val issuesResponse = gitLab!!
val issuesResponse = gitLab
.getIssues(fakeProject!!.id, defaultState)
.blockingGet()
TestUtil.assertRetrofitResponseSuccess(issuesResponse)
Loading
Loading
@@ -78,7 +78,7 @@ class ApiTests {
fun getFiles() {
val defaultBranch = "master"
val currentPath = ""
val treeResponse = gitLab!!
val treeResponse = gitLab
.getTree(fakeProject!!.id, defaultBranch, currentPath)
.blockingGet()
assertNotNull(treeResponse)
Loading
Loading
@@ -87,7 +87,7 @@ class ApiTests {
@Test
fun getCommits() {
val defaultBranch = "master"
val commitsResponse = gitLab!!
val commitsResponse = gitLab
.getCommits(fakeProject!!.id, defaultBranch, 1)
.blockingGet()
assertNotNull(commitsResponse)
Loading
Loading
@@ -96,7 +96,7 @@ class ApiTests {
@Test
fun getMergeRequests() {
val defaultState = "opened"
val mergeRequestResponse = gitLab!!
val mergeRequestResponse = gitLab
.getMergeRequests(fakeProject!!.id, defaultState)
.blockingGet()
TestUtil.assertRetrofitResponseSuccess(mergeRequestResponse)
Loading
Loading
@@ -105,7 +105,7 @@ class ApiTests {
 
@Test
fun getCurrentUser() {
val userFullResponse = gitLab!!
val userFullResponse = gitLab
.getThisUser()
.blockingGet()
TestUtil.assertRetrofitResponseSuccess(userFullResponse)
Loading
Loading
Loading
Loading
@@ -9,7 +9,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-beta4'
classpath 'com.android.tools.build:gradle:3.0.0-beta6'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath 'com.github.ben-manes:gradle-versions-plugin:0.15.0'
classpath 'com.github.Commit451:updatewrapper:1.1.2'
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment