Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit cd14978

Browse files
committed
chore(clean up): rm warnings & wip tag
1 parent dbd5ab3 commit cd14978

File tree

7 files changed

+7
-25
lines changed

7 files changed

+7
-25
lines changed

lib/mastani_server/accounts/delegates/achievements.ex

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ defmodule MastaniServer.Accounts.Delegate.Achievements do
106106

107107
def do_set_member(%User{id: user_id}, attrs) do
108108
with {:ok, achievement} <- ORM.findby_or_insert(Achievement, ~m(user_id)a, ~m(user_id)a) do
109-
IO.inspect(attrs, label: "hello attrs")
110109
achievement |> ORM.update(attrs)
111110
end
112111
end

test/mastani_server/accounts/customization_test.exs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,19 @@ defmodule MastaniServer.Test.Accounts.Customization do
1212
end
1313

1414
describe "[user customization]" do
15-
@tag :wip
1615
test "user can have default customization without payment", ~m(user)a do
1716
{:ok, result} = Accounts.set_customization(user, :banner_layout, "digest")
1817
assert result.banner_layout == "digest"
1918
end
2019

21-
@tag :wip
2220
test "user set non exsit customization fails", ~m(user)a do
2321
{:error, _} = Accounts.set_customization(user, :non_exsit, true)
2422
end
2523

26-
@tag :wip2
2724
test "user set advance customization without payment fails", ~m(user)a do
2825
{:error, _} = Accounts.set_customization(user, :theme, "blue")
2926
end
3027

31-
@tag :wip2
3228
test "user can set multiable customization at once", ~m(user)a do
3329
{:ok, result} =
3430
Accounts.set_customization(user, %{

test/mastani_server/billing/billing_test.exs

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ defmodule MastaniServer.Test.Billing do
1818
end
1919

2020
describe "[billing curd]" do
21-
@tag :wip
2221
test "create bill record with valid attrs", ~m(user valid_attrs)a do
2322
{:ok, record} = Billing.create_record(user, valid_attrs)
2423

@@ -29,29 +28,25 @@ defmodule MastaniServer.Test.Billing do
2928
assert String.length(record.hash_id) == 8
3029
end
3130

32-
@tag :wip
3331
test "create bill record with valid note", ~m(user valid_attrs)a do
3432
{:ok, record} = Billing.create_record(user, valid_attrs |> Map.merge(%{note: "i am girl"}))
3533

3634
assert record.note == "i am girl"
3735
end
3836

39-
@tag :wip
4037
test "create bill record with previous record unhandled fails", ~m(user valid_attrs)a do
4138
{:ok, _record} = Billing.create_record(user, valid_attrs)
4239
{:error, error} = Billing.create_record(user, valid_attrs)
4340
assert error |> Keyword.get(:code) == ecode(:exsit_pending_bill)
4441
end
4542

46-
@tag :wip
4743
test "record state can be update", ~m(user valid_attrs)a do
4844
{:ok, record} = Billing.create_record(user, valid_attrs)
4945

5046
{:ok, updated} = Billing.update_record_state(record.id, :done)
5147
assert updated.state == "done"
5248
end
5349

54-
@tag :wip
5550
test "can get paged bill records of a user", ~m(user valid_attrs)a do
5651
{:ok, _record} = Billing.create_record(user, valid_attrs)
5752

@@ -63,45 +58,41 @@ defmodule MastaniServer.Test.Billing do
6358
end
6459

6560
describe "[after billing]" do
66-
@tag :wip
6761
test "user updgrade to seninor_member after seninor bill handled", ~m(user valid_attrs)a do
6862
attrs = valid_attrs |> Map.merge(%{amount: @seninor_amount_threshold})
6963

7064
{:ok, record} = Billing.create_record(user, attrs)
71-
{:ok, updated} = Billing.update_record_state(record.id, :done)
65+
{:ok, _updated} = Billing.update_record_state(record.id, :done)
7266

7367
{:ok, %{achievement: achievement}} = ORM.find(User, user.id, preload: :achievement)
7468
assert achievement.seninor_member == true
7569
end
7670

77-
@tag :wip
7871
test "user updgrade to donate_member after donate bill handled", ~m(user valid_attrs)a do
7972
attrs = valid_attrs |> Map.merge(%{amount: @seninor_amount_threshold - 10})
8073

8174
{:ok, record} = Billing.create_record(user, attrs)
82-
{:ok, updated} = Billing.update_record_state(record.id, :done)
75+
{:ok, _updated} = Billing.update_record_state(record.id, :done)
8376

8477
{:ok, %{achievement: achievement}} = ORM.find(User, user.id, preload: :achievement)
8578
assert achievement.donate_member == true
8679
end
8780

88-
@tag :wip
8981
test "girls updgrade to seninor_member after bill handled", ~m(user valid_attrs)a do
9082
attrs = valid_attrs |> Map.merge(%{amount: 0, payment_usage: "girls_code_too_plan"})
9183

9284
{:ok, record} = Billing.create_record(user, attrs)
93-
{:ok, updated} = Billing.update_record_state(record.id, :done)
85+
{:ok, _updated} = Billing.update_record_state(record.id, :done)
9486

9587
{:ok, %{achievement: achievement}} = ORM.find(User, user.id, preload: :achievement)
9688
assert achievement.seninor_member == true
9789
end
9890

99-
@tag :wip
10091
test "sponsor updgrade to seninor_member after bill handled", ~m(user valid_attrs)a do
10192
attrs = valid_attrs |> Map.merge(%{amount: 0, payment_usage: "sponsor"})
10293

10394
{:ok, record} = Billing.create_record(user, attrs)
104-
{:ok, updated} = Billing.update_record_state(record.id, :done)
95+
{:ok, _updated} = Billing.update_record_state(record.id, :done)
10596

10697
{:ok, %{achievement: achievement}} = ORM.find(User, user.id, preload: :achievement)
10798
assert achievement.sponsor_member == true

test/mastani_server_web/mutation/billing/billing_test.exs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ defmodule MastaniServer.Test.Mutation.Billing.Basic do
3131
}
3232
}
3333
"""
34-
@tag :wip
35-
test "auth user can create bill", ~m(user user_conn valid_attrs)a do
34+
test "auth user can create bill", ~m(user_conn valid_attrs)a do
3635
variables = valid_attrs |> camelize_map_key(:upcase)
3736

3837
created = user_conn |> mutation_result(@create_query, variables, "createBill")
@@ -49,7 +48,6 @@ defmodule MastaniServer.Test.Mutation.Billing.Basic do
4948
}
5049
}
5150
"""
52-
@tag :wip
5351
test "auth user can update bill state", ~m(user valid_attrs)a do
5452
{:ok, record} = Billing.create_record(user, valid_attrs)
5553

test/mastani_server_web/query/billing/billing_test.exs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ defmodule MastaniServer.Test.Query.Billing.Basic do
3737
}
3838
}
3939
"""
40-
41-
@tag :wip
4240
test "login user can get it's own billing records ", ~m(user_conn user valid_attrs)a do
4341
{:ok, _record} = Billing.create_record(user, valid_attrs)
4442

test/mastani_server_web/query/cms/paged_posts_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ defmodule MastaniServer.Test.Query.PagedPosts do
122122
variables = %{filter: %{}}
123123
results = guest_conn |> query_result(@query, variables, "pagedPosts")
124124
inserted_timestamps = results["entries"] |> Enum.map(& &1["inserted_at"])
125-
IO.inspect(inserted_timestamps, label: "inserted_timestamps")
125+
# IO.inspect(inserted_timestamps, label: "inserted_timestamps")
126126

127127
{:ok, first_inserted_time, 0} =
128128
inserted_timestamps |> List.first() |> DateTime.from_iso8601()

test/mastani_server_web/query/cms/post_comment_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ defmodule MastaniServer.Test.Query.PostComment do
153153
results = guest_conn |> query_result(@query, variables, "pagedPosts")
154154

155155
# for test window function
156-
commentsParticipators = results["entries"]
156+
_commentsParticipators = results["entries"]
157157
# IO.inspect(commentsParticipators, label: "commentsParticipators->")
158158
end
159159

0 commit comments

Comments
 (0)