diaspora/spec/javascripts/app/collections/pods_spec.js
Florian Staudacher 738413c65f fix some issues with pod-checking
add tooltips in the frontend
fix a JS problem with empty hostname
use `find_in_batches` correctly
add a migration to clean up the pods table + unique index on hostname
2015-08-30 18:50:34 +02:00

16 lines
506 B
JavaScript

describe("app.collections.Pods", function() {
describe("#comparator", function() {
it("should handle empty hostnames", function() {
var collection = new app.collections.Pods([
{id: 1},
{id: 2, host: "zzz.zz"},
{id: 3, host: "aaa.aa"},
{id: 4, host: ""}
]);
expect(collection.length).toBe(4);
expect(collection.first().get("host")).toBeFalsy(); // also empty string
expect(collection.last().get("host")).toBe("zzz.zz");
});
});
});