Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
relf committed Jun 9, 2020
1 parent 805cb64 commit 8384105
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/controllers/api/v1/meta_models_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ class Api::V1::MetaModelsControllerTest < ActionDispatch::IntegrationTest
assert_equal 2, mms.count # cicav_meta_model2 is private hence 2 instead of 3
end

test "should show a metamodel" do
mm = meta_models(:cicav_metamodel)
get api_v1_meta_model_url(mm), as: :json, headers: @auth_headers
assert_response :success
mminfos = JSON.parse(response.body)
assert_equal ["created_at", "id", "name", "owner_email"], mminfos.keys.sort
end

test "should create a metamodel" do
assert_difference("Analysis.count", 1) do
assert_difference("Operation.count", 2) do # doe copy + metamodel
Expand Down

0 comments on commit 8384105

Please sign in to comment.