Skip to content

Commit

Permalink
FIX: Fix tests for printer list
Browse files Browse the repository at this point in the history
  • Loading branch information
josefdolezal committed May 9, 2017
1 parent ef4a35f commit d5839c2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class PrinterListCellViewModelTests: QuickSpec {
let printer = Printer(url: URL(string: printerPath)!, accessToken: "Secret Token", name: printerName, streamUrl: nil)
let subject = PrinterListCellViewModel(printer: printer)

expect(subject.printerName) == printerName
expect(subject.printerURL) == printerPath
expect(subject.printerName.value) == printerName
expect(subject.printerURL.value) == printerPath
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ class PrinterListViewModelTests: QuickSpec {
}

let model0 = subject.outputs.storedPrinterCellViewModel(for: 0)
expect(model0.printerName) == "My Printer 0"
expect(model0.printerURL) == "http://localhost0"
expect(model0.outputs.printerName.value) == "My Printer 0"
expect(model0.outputs.printerURL.value) == "http://localhost0"

let model1 = subject.outputs.storedPrinterCellViewModel(for: 1)
expect(model1.printerName) == "My Printer 1"
expect(model1.printerURL) == "http://localhost1"
expect(model1.outputs.printerName.value) == "My Printer 1"
expect(model1.outputs.printerURL.value) == "http://localhost1"
}
}

Expand All @@ -111,7 +111,7 @@ class PrinterListViewModelTests: QuickSpec {
}

extension PrinterListViewModelTests: PrinterListViewControllerDelegate {
func selectedPrinterProvider(provider: OctoPrintProvider) {
func selectedPrinterProvider(provider: OctoPrintProvider, printerID: String) {
onSelectedPrinterProvider?(provider)
}

Expand Down

0 comments on commit d5839c2

Please sign in to comment.