|
@@ -19,6 +19,14 @@ class Api::V1::ActivitiesControllerTest < ActionDispatch::IntegrationTest
|
19
|
19
|
assert_response :forbidden
|
20
|
20
|
end
|
21
|
21
|
|
|
22
|
+ # test "should filter activities by name" do
|
|
23
|
+ # assert_equal 2, Activity.filter_by_name('pyheatpump').count
|
|
24
|
+ # end
|
|
25
|
+
|
|
26
|
+ # test "should filter activities by name and sort them" do
|
|
27
|
+ # assert_equal [activities(:one), activities(:three)], Activity.all.select {|n| n.name.include?("pyheat")}.sort {|a,b| a.name <=> b.name}
|
|
28
|
+ # end
|
|
29
|
+
|
22
|
30
|
#SHOW
|
23
|
31
|
test "should access show" do
|
24
|
32
|
get api_v1_activity_url(@activity),
|