diff options
| author | Alban Peignier | 2017-09-30 14:56:19 +0200 | 
|---|---|---|
| committer | Alban Peignier | 2017-09-30 14:56:19 +0200 | 
| commit | 41b5f838990b187c944d682d959b2d4f3c94d7f0 (patch) | |
| tree | a44fc1e84114ecbf240b02e029871a1199e537bd | |
| parent | 5bf102d98fca662257bf89ff1c8f3649c5fd9476 (diff) | |
| download | chouette-core-41b5f838990b187c944d682d959b2d4f3c94d7f0.tar.bz2 | |
Update API Key features spec to use /dashboard page. Refs #4655
| -rw-r--r-- | spec/features/api_keys/delete_api_key_feature_spec.rb | 5 | ||||
| -rw-r--r-- | spec/features/api_keys/edit_api_key_feature_spec.rb | 2 | ||||
| -rw-r--r-- | spec/features/api_keys/new_api_key_feature_spec.rb | 10 | 
3 files changed, 8 insertions, 9 deletions
| diff --git a/spec/features/api_keys/delete_api_key_feature_spec.rb b/spec/features/api_keys/delete_api_key_feature_spec.rb index b58e819a6..6bfc686af 100644 --- a/spec/features/api_keys/delete_api_key_feature_spec.rb +++ b/spec/features/api_keys/delete_api_key_feature_spec.rb @@ -10,7 +10,7 @@ RSpec.describe 'New API Key', type: :feature do      xit 'complete workflow' do        # /workbenches -      visit workbenches_path  +      visit dashboard_path        # the api_key is visible        click_link edit_label @@ -23,7 +23,7 @@ RSpec.describe 'New API Key', type: :feature do        # expect(Api::V1::ApiKey.where(id: api_key.id)).to be_empty        # # check redirect and changed display -      # expect(page.current_path).to eq(workbenches_path) +      # expect(page.current_path).to eq(dashboard_path)        # # deleted api_key's not shown anymore        # expect( page ).not_to have_content(edit_label)      end @@ -31,4 +31,3 @@ RSpec.describe 'New API Key', type: :feature do    end  end -   diff --git a/spec/features/api_keys/edit_api_key_feature_spec.rb b/spec/features/api_keys/edit_api_key_feature_spec.rb index b5a0fefc7..256c4218b 100644 --- a/spec/features/api_keys/edit_api_key_feature_spec.rb +++ b/spec/features/api_keys/edit_api_key_feature_spec.rb @@ -1,4 +1,4 @@ -RSpec.describe 'New API Key', type: :feature do +RSpec.describe 'Edit API Key', type: :feature do    login_user    describe "api_keys#edit" do diff --git a/spec/features/api_keys/new_api_key_feature_spec.rb b/spec/features/api_keys/new_api_key_feature_spec.rb index eba873691..988690f3c 100644 --- a/spec/features/api_keys/new_api_key_feature_spec.rb +++ b/spec/features/api_keys/new_api_key_feature_spec.rb @@ -1,3 +1,4 @@ +# coding: utf-8  RSpec.describe 'New API Key', type: :feature do    login_user @@ -13,21 +14,21 @@ RSpec.describe 'New API Key', type: :feature do      it 'complete workflow' do        # /workbenches -      visit workbenches_path  +      visit dashboard_path        expect(page).to have_link(create_label, href: new_api_key_path)        # to be created api_key does not exist yet        expect( page ).not_to have_content(unique_name)        # /api_keys/new -      click_link create_label  -      fill_in(name_label, with: unique_name)  +      click_link create_label +      fill_in(name_label, with: unique_name)        click_button validate_label        # check impact on DB        expect(last_api_key.name).to eq(unique_name)        # check redirect and changed display -      expect(page.current_path).to eq(workbenches_path) +      expect(page.current_path).to eq(dashboard_path)        # to be created api_key exists now        expect( page ).to have_content(unique_name)      end @@ -35,4 +36,3 @@ RSpec.describe 'New API Key', type: :feature do    end  end -   | 
