|
755 | 755 | end |
756 | 756 | end |
757 | 757 | end |
| 758 | + |
| 759 | + describe "#lfi?" do |
| 760 | + context "when #type is :lfi" do |
| 761 | + let(:type) { :lfi } |
| 762 | + |
| 763 | + it "must return true" do |
| 764 | + expect(subject.lfi?).to be(true) |
| 765 | + end |
| 766 | + end |
| 767 | + |
| 768 | + context "when #type is not :lfi" do |
| 769 | + let(:type) { :command_injection } |
| 770 | + |
| 771 | + it "must return false" do |
| 772 | + expect(subject.lfi?).to be(false) |
| 773 | + end |
| 774 | + end |
| 775 | + end |
| 776 | + |
| 777 | + describe "#rfi?" do |
| 778 | + context "when #type is :rfi" do |
| 779 | + let(:type) { :rfi } |
| 780 | + |
| 781 | + it "must return true" do |
| 782 | + expect(subject.rfi?).to be(true) |
| 783 | + end |
| 784 | + end |
| 785 | + |
| 786 | + context "when #type is not :rfi" do |
| 787 | + let(:type) { :command_injection } |
| 788 | + |
| 789 | + it "must return false" do |
| 790 | + expect(subject.rfi?).to be(false) |
| 791 | + end |
| 792 | + end |
| 793 | + end |
| 794 | + |
| 795 | + describe "#sqli?" do |
| 796 | + context "when #type is :sqli" do |
| 797 | + let(:type) { :sqli } |
| 798 | + |
| 799 | + it "must return true" do |
| 800 | + expect(subject.sqli?).to be(true) |
| 801 | + end |
| 802 | + end |
| 803 | + |
| 804 | + context "when #type is not :sqli" do |
| 805 | + let(:type) { :command_injection } |
| 806 | + |
| 807 | + it "must return false" do |
| 808 | + expect(subject.sqli?).to be(false) |
| 809 | + end |
| 810 | + end |
| 811 | + end |
| 812 | + |
| 813 | + describe "#ssti?" do |
| 814 | + context "when #type is :ssti" do |
| 815 | + let(:type) { :ssti } |
| 816 | + |
| 817 | + it "must return true" do |
| 818 | + expect(subject.ssti?).to be(true) |
| 819 | + end |
| 820 | + end |
| 821 | + |
| 822 | + context "when #type is not :ssti" do |
| 823 | + let(:type) { :command_injection } |
| 824 | + |
| 825 | + it "must return false" do |
| 826 | + expect(subject.ssti?).to be(false) |
| 827 | + end |
| 828 | + end |
| 829 | + end |
| 830 | + |
| 831 | + describe "#open_redirect?" do |
| 832 | + context "when #type is :open_redirect" do |
| 833 | + let(:type) { :open_redirect } |
| 834 | + |
| 835 | + it "must return true" do |
| 836 | + expect(subject.open_redirect?).to be(true) |
| 837 | + end |
| 838 | + end |
| 839 | + |
| 840 | + context "when #type is not :open_redirect" do |
| 841 | + let(:type) { :command_injection } |
| 842 | + |
| 843 | + it "must return false" do |
| 844 | + expect(subject.open_redirect?).to be(false) |
| 845 | + end |
| 846 | + end |
| 847 | + end |
| 848 | + |
| 849 | + describe "#reflected_xss?" do |
| 850 | + context "when #type is :reflected_xss" do |
| 851 | + let(:type) { :reflected_xss } |
| 852 | + |
| 853 | + it "must return true" do |
| 854 | + expect(subject.reflected_xss?).to be(true) |
| 855 | + end |
| 856 | + end |
| 857 | + |
| 858 | + context "when #type is not :reflected_xss" do |
| 859 | + let(:type) { :command_injection } |
| 860 | + |
| 861 | + it "must return false" do |
| 862 | + expect(subject.reflected_xss?).to be(false) |
| 863 | + end |
| 864 | + end |
| 865 | + end |
| 866 | + |
| 867 | + describe "#command_injection?" do |
| 868 | + context "when #type is :command_injection" do |
| 869 | + let(:type) { :command_injection } |
| 870 | + |
| 871 | + it "must return true" do |
| 872 | + expect(subject.command_injection?).to be(true) |
| 873 | + end |
| 874 | + end |
| 875 | + |
| 876 | + context "when #type is not :command_injection" do |
| 877 | + let(:type) { :lfi } |
| 878 | + |
| 879 | + it "must return false" do |
| 880 | + expect(subject.command_injection?).to be(false) |
| 881 | + end |
| 882 | + end |
| 883 | + end |
758 | 884 | end |
0 commit comments