|
881 | 881 | end |
882 | 882 | end |
883 | 883 | end |
| 884 | + |
| 885 | + describe "#copy_request?" do |
| 886 | + context "when #request_method is :copy" do |
| 887 | + let(:request_method) { :copy } |
| 888 | + |
| 889 | + it "must return true" do |
| 890 | + expect(subject.copy_request?).to be(true) |
| 891 | + end |
| 892 | + end |
| 893 | + |
| 894 | + context "when #request_method is not :copy" do |
| 895 | + let(:request_method) { :unlock } |
| 896 | + |
| 897 | + it "must return false" do |
| 898 | + expect(subject.copy_request?).to be(false) |
| 899 | + end |
| 900 | + end |
| 901 | + end |
| 902 | + |
| 903 | + describe "#delete_request?" do |
| 904 | + context "when #request_method is :delete" do |
| 905 | + let(:request_method) { :delete } |
| 906 | + |
| 907 | + it "must return true" do |
| 908 | + expect(subject.delete_request?).to be(true) |
| 909 | + end |
| 910 | + end |
| 911 | + |
| 912 | + context "when #request_method is not :delete" do |
| 913 | + let(:request_method) { :unlock } |
| 914 | + |
| 915 | + it "must return false" do |
| 916 | + expect(subject.delete_request?).to be(false) |
| 917 | + end |
| 918 | + end |
| 919 | + end |
| 920 | + |
| 921 | + describe "#get_request?" do |
| 922 | + context "when #request_method is :get" do |
| 923 | + let(:request_method) { :get } |
| 924 | + |
| 925 | + it "must return true" do |
| 926 | + expect(subject.get_request?).to be(true) |
| 927 | + end |
| 928 | + end |
| 929 | + |
| 930 | + context "when #request_method is not :get" do |
| 931 | + let(:request_method) { :unlock } |
| 932 | + |
| 933 | + it "must return false" do |
| 934 | + expect(subject.get_request?).to be(false) |
| 935 | + end |
| 936 | + end |
| 937 | + end |
| 938 | + |
| 939 | + describe "#head_request?" do |
| 940 | + context "when #request_method is :head" do |
| 941 | + let(:request_method) { :head } |
| 942 | + |
| 943 | + it "must return true" do |
| 944 | + expect(subject.head_request?).to be(true) |
| 945 | + end |
| 946 | + end |
| 947 | + |
| 948 | + context "when #request_method is not :head" do |
| 949 | + let(:request_method) { :unlock } |
| 950 | + |
| 951 | + it "must return false" do |
| 952 | + expect(subject.head_request?).to be(false) |
| 953 | + end |
| 954 | + end |
| 955 | + end |
| 956 | + |
| 957 | + describe "#lock_request?" do |
| 958 | + context "when #request_method is :lock" do |
| 959 | + let(:request_method) { :lock } |
| 960 | + |
| 961 | + it "must return true" do |
| 962 | + expect(subject.lock_request?).to be(true) |
| 963 | + end |
| 964 | + end |
| 965 | + |
| 966 | + context "when #request_method is not :lock" do |
| 967 | + let(:request_method) { :unlock } |
| 968 | + |
| 969 | + it "must return false" do |
| 970 | + expect(subject.lock_request?).to be(false) |
| 971 | + end |
| 972 | + end |
| 973 | + end |
| 974 | + |
| 975 | + describe "#mkcol_request?" do |
| 976 | + context "when #request_method is :mkcol" do |
| 977 | + let(:request_method) { :mkcol } |
| 978 | + |
| 979 | + it "must return true" do |
| 980 | + expect(subject.mkcol_request?).to be(true) |
| 981 | + end |
| 982 | + end |
| 983 | + |
| 984 | + context "when #request_method is not :mkcol" do |
| 985 | + let(:request_method) { :unlock } |
| 986 | + |
| 987 | + it "must return false" do |
| 988 | + expect(subject.mkcol_request?).to be(false) |
| 989 | + end |
| 990 | + end |
| 991 | + end |
| 992 | + |
| 993 | + describe "#move_request?" do |
| 994 | + context "when #request_method is :move" do |
| 995 | + let(:request_method) { :move } |
| 996 | + |
| 997 | + it "must return true" do |
| 998 | + expect(subject.move_request?).to be(true) |
| 999 | + end |
| 1000 | + end |
| 1001 | + |
| 1002 | + context "when #request_method is not :move" do |
| 1003 | + let(:request_method) { :unlock } |
| 1004 | + |
| 1005 | + it "must return false" do |
| 1006 | + expect(subject.move_request?).to be(false) |
| 1007 | + end |
| 1008 | + end |
| 1009 | + end |
| 1010 | + |
| 1011 | + describe "#options_request?" do |
| 1012 | + context "when #request_method is :options" do |
| 1013 | + let(:request_method) { :options } |
| 1014 | + |
| 1015 | + it "must return true" do |
| 1016 | + expect(subject.options_request?).to be(true) |
| 1017 | + end |
| 1018 | + end |
| 1019 | + |
| 1020 | + context "when #request_method is not :options" do |
| 1021 | + let(:request_method) { :unlock } |
| 1022 | + |
| 1023 | + it "must return false" do |
| 1024 | + expect(subject.options_request?).to be(false) |
| 1025 | + end |
| 1026 | + end |
| 1027 | + end |
| 1028 | + |
| 1029 | + describe "#patch_request?" do |
| 1030 | + context "when #request_method is :patch" do |
| 1031 | + let(:request_method) { :patch } |
| 1032 | + |
| 1033 | + it "must return true" do |
| 1034 | + expect(subject.patch_request?).to be(true) |
| 1035 | + end |
| 1036 | + end |
| 1037 | + |
| 1038 | + context "when #request_method is not :patch" do |
| 1039 | + let(:request_method) { :unlock } |
| 1040 | + |
| 1041 | + it "must return false" do |
| 1042 | + expect(subject.patch_request?).to be(false) |
| 1043 | + end |
| 1044 | + end |
| 1045 | + end |
| 1046 | + |
| 1047 | + describe "#post_request?" do |
| 1048 | + context "when #request_method is :post" do |
| 1049 | + let(:request_method) { :post } |
| 1050 | + |
| 1051 | + it "must return true" do |
| 1052 | + expect(subject.post_request?).to be(true) |
| 1053 | + end |
| 1054 | + end |
| 1055 | + |
| 1056 | + context "when #request_method is not :post" do |
| 1057 | + let(:request_method) { :unlock } |
| 1058 | + |
| 1059 | + it "must return false" do |
| 1060 | + expect(subject.post_request?).to be(false) |
| 1061 | + end |
| 1062 | + end |
| 1063 | + end |
| 1064 | + |
| 1065 | + describe "#propfind_request?" do |
| 1066 | + context "when #request_method is :propfind" do |
| 1067 | + let(:request_method) { :propfind } |
| 1068 | + |
| 1069 | + it "must return true" do |
| 1070 | + expect(subject.propfind_request?).to be(true) |
| 1071 | + end |
| 1072 | + end |
| 1073 | + |
| 1074 | + context "when #request_method is not :propfind" do |
| 1075 | + let(:request_method) { :unlock } |
| 1076 | + |
| 1077 | + it "must return false" do |
| 1078 | + expect(subject.propfind_request?).to be(false) |
| 1079 | + end |
| 1080 | + end |
| 1081 | + end |
| 1082 | + |
| 1083 | + describe "#proppatch_request?" do |
| 1084 | + context "when #request_method is :proppatch" do |
| 1085 | + let(:request_method) { :proppatch } |
| 1086 | + |
| 1087 | + it "must return true" do |
| 1088 | + expect(subject.proppatch_request?).to be(true) |
| 1089 | + end |
| 1090 | + end |
| 1091 | + |
| 1092 | + context "when #request_method is not :proppatch" do |
| 1093 | + let(:request_method) { :unlock } |
| 1094 | + |
| 1095 | + it "must return false" do |
| 1096 | + expect(subject.proppatch_request?).to be(false) |
| 1097 | + end |
| 1098 | + end |
| 1099 | + end |
| 1100 | + |
| 1101 | + describe "#put_request?" do |
| 1102 | + context "when #request_method is :put" do |
| 1103 | + let(:request_method) { :put } |
| 1104 | + |
| 1105 | + it "must return true" do |
| 1106 | + expect(subject.put_request?).to be(true) |
| 1107 | + end |
| 1108 | + end |
| 1109 | + |
| 1110 | + context "when #request_method is not :put" do |
| 1111 | + let(:request_method) { :unlock } |
| 1112 | + |
| 1113 | + it "must return false" do |
| 1114 | + expect(subject.put_request?).to be(false) |
| 1115 | + end |
| 1116 | + end |
| 1117 | + end |
| 1118 | + |
| 1119 | + describe "#trace_request?" do |
| 1120 | + context "when #request_method is :trace" do |
| 1121 | + let(:request_method) { :trace } |
| 1122 | + |
| 1123 | + it "must return true" do |
| 1124 | + expect(subject.trace_request?).to be(true) |
| 1125 | + end |
| 1126 | + end |
| 1127 | + |
| 1128 | + context "when #request_method is not :trace" do |
| 1129 | + let(:request_method) { :unlock } |
| 1130 | + |
| 1131 | + it "must return false" do |
| 1132 | + expect(subject.trace_request?).to be(false) |
| 1133 | + end |
| 1134 | + end |
| 1135 | + end |
| 1136 | + |
| 1137 | + describe "#unlock_request?" do |
| 1138 | + context "when #request_method is :unlock" do |
| 1139 | + let(:request_method) { :unlock } |
| 1140 | + |
| 1141 | + it "must return true" do |
| 1142 | + expect(subject.unlock_request?).to be(true) |
| 1143 | + end |
| 1144 | + end |
| 1145 | + |
| 1146 | + context "when #request_method is not :unlock" do |
| 1147 | + let(:request_method) { :get } |
| 1148 | + |
| 1149 | + it "must return false" do |
| 1150 | + expect(subject.unlock_request?).to be(false) |
| 1151 | + end |
| 1152 | + end |
| 1153 | + end |
884 | 1154 | end |
0 commit comments