diff options
Diffstat (limited to 'spec/routing/web_ide_routing_spec.rb')
-rw-r--r-- | spec/routing/web_ide_routing_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/routing/web_ide_routing_spec.rb b/spec/routing/web_ide_routing_spec.rb new file mode 100644 index 00000000000..58c24189dfd --- /dev/null +++ b/spec/routing/web_ide_routing_spec.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +require "spec_helper" + +RSpec.describe "Web IDE routing", feature_category: :remote_development do + describe 'remote' do + it "routes to #index, without remote_path" do + expect(post("/-/ide/remote/my.env.gitlab.example.com%3A3443")).to route_to( + "web_ide/remote_ide#index", + remote_host: 'my.env.gitlab.example.com:3443' + ) + end + + it "routes to #index, with remote_path" do + expect(post("/-/ide/remote/my.env.gitlab.example.com%3A3443/foo/bar.dev/test.dir")).to route_to( + "web_ide/remote_ide#index", + remote_host: 'my.env.gitlab.example.com:3443', + remote_path: 'foo/bar.dev/test.dir' + ) + end + end +end |