diff --git a/accounting/templates/accounting/refound_account.jinja b/accounting/templates/accounting/refound_account.jinja
new file mode 100644
index 00000000..ff4995ac
--- /dev/null
+++ b/accounting/templates/accounting/refound_account.jinja
@@ -0,0 +1,14 @@
+{% extends "core/base.jinja" %}
+
+{% block title %}
+{% trans %}Refound account{% endtrans %}
+{% endblock %}
+
+{% block content %}
+
{% trans %}Refound account{% endtrans %}
+
+{% endblock %}
\ No newline at end of file
diff --git a/accounting/tests.py b/accounting/tests.py
index 7ce503c2..44fb84e9 100644
--- a/accounting/tests.py
+++ b/accounting/tests.py
@@ -1,3 +1,47 @@
-from django.test import TestCase
+from django.test import Client, TestCase
+from django.core.urlresolvers import reverse
+from django.contrib.auth.models import Group
+from django.core.management import call_command
+from django.conf import settings
-# Create your tests here.
+from core.models import User
+from counter.models import Counter
+
+
+class RefoundAccountTest(TestCase):
+ def setUp(self):
+ call_command("populate")
+ self.skia = User.objects.filter(username="skia").first()
+ # reffil skia's account
+ self.skia.customer.amount = 800
+ self.skia.customer.save()
+
+ def test_permission_denied(self):
+ self.client.login(useername='guy', password='plop')
+ response_post = self.client.post(reverse("accounting:refound_account"),
+ {"user": self.skia.id})
+ response_get = self.client.get(reverse("accounting:refound_account"))
+ self.assertTrue(response_get.status_code == 403)
+ self.assertTrue(response_post.status_code == 403)
+
+ def test_root_granteed(self):
+ self.client.login(username='root', password='plop')
+ response_post = self.client.post(reverse("accounting:refound_account"),
+ {"user": self.skia.id})
+ self.skia = User.objects.filter(username='skia').first()
+ response_get = self.client.get(reverse("accounting:refound_account"))
+ self.assertFalse(response_get.status_code == 403)
+ self.assertTrue('