Sha256: 169af582a4cb2817c628cfc823bebb08e08f3f91d406a37ac9bd4115c1886be8
Contents?: true
Size: 1.45 KB
Versions: 13
Compression:
Stored size: 1.45 KB
Contents
require 'dock_health_api' require 'spec_helper' RSpec.describe DockHealthApi::CustomField do let(:params) { {targetType: "PATIENT", fieldCategoryType: "PATIENT_PERSONAL", fieldType: "TEXT", name: "test1234"} } id = "" describe "#list" do context "list all customfield" do it 'should list all customfield' do response = DockHealthApi::CustomField.list expect(response.first.is_a?(DockHealthApi::CustomField)) end end end describe "#create" do context "create a new customfield" do it 'should create a new customfield' do response = DockHealthApi::CustomField.create(params) expect(response["name"]).to eq(params[:name]) id = response["id"] end end end describe "#get" do context "find a specific customfield" do it 'should find the specific customfield' do response = DockHealthApi::CustomField.get(id) expect(response["name"]).to eq(params[:name]) end end end describe "#update" do context "update customfield" do it 'should update the customfield' do response = DockHealthApi::CustomField.update(id: id, name: "update") expect(response["name"]).to eq("update") end end end describe "#delete" do context "delete customfield" do it 'should delete the customfield' do response = DockHealthApi::CustomField.delete(id: id) expect(response["id"]).to eq(id) end end end end
Version data entries
13 entries across 13 versions & 1 rubygems