Fix usericons (#1408)

* Fix and refactor user icons, add Basic tests
* Remove identicon_canvas, use identicon.js
* Use octicon by default
This commit is contained in:
Dawa Ometto
2019-09-01 21:45:55 +02:00
committed by GitHub
parent 569eac3a06
commit d1b1375629
23 changed files with 292 additions and 620 deletions
+1 -15
View File
@@ -7,19 +7,5 @@ context "Precious::Views::History" do
@history = Precious::Views::History.new
end
test "string_to_code" do
# Result must match the following Java code.
=begin
public static void main(String[] args) throws Exception {
final String s = "code@example.com";
final byte[] b = MessageDigest.getInstance("SHA1").digest(s.toString().getBytes("UTF-8"));
final int c = ((b[0] & 0xFF) << 24) | ((b[1] & 0xFF) << 16)
| ((b[2] & 0xFF) << 8) | (b[3] & 0xFF);
// 143327882
System.out.println(c);
}
=end
actual = @history.string_to_code 'code@example.com'
assert_equal 143327882, actual
end
# No tests yet
end