Normalize instance in login tests
This commit is contained in:
parent
386af1ea2c
commit
bc72739dda
2 changed files with 7 additions and 5 deletions
|
@ -1,6 +1,7 @@
|
||||||
import { Map as ImmutableMap } from 'immutable';
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
import { normalizeInstance } from 'soapbox/normalizers';
|
||||||
|
|
||||||
import { fireEvent, render, screen } from '../../../../jest/test-helpers';
|
import { fireEvent, render, screen } from '../../../../jest/test-helpers';
|
||||||
import LoginForm from '../login_form';
|
import LoginForm from '../login_form';
|
||||||
|
|
||||||
|
@ -8,7 +9,7 @@ describe('<LoginForm />', () => {
|
||||||
it('renders for Pleroma', () => {
|
it('renders for Pleroma', () => {
|
||||||
const mockFn = jest.fn();
|
const mockFn = jest.fn();
|
||||||
const store = {
|
const store = {
|
||||||
instance: ImmutableMap({
|
instance: normalizeInstance({
|
||||||
version: '2.7.2 (compatible; Pleroma 2.3.0)',
|
version: '2.7.2 (compatible; Pleroma 2.3.0)',
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
@ -21,7 +22,7 @@ describe('<LoginForm />', () => {
|
||||||
it('renders for Mastodon', () => {
|
it('renders for Mastodon', () => {
|
||||||
const mockFn = jest.fn();
|
const mockFn = jest.fn();
|
||||||
const store = {
|
const store = {
|
||||||
instance: ImmutableMap({
|
instance: normalizeInstance({
|
||||||
version: '3.0.0',
|
version: '3.0.0',
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
import { Map as ImmutableMap } from 'immutable';
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
import { normalizeInstance } from 'soapbox/normalizers';
|
||||||
|
|
||||||
import { render, screen } from '../../../../jest/test-helpers';
|
import { render, screen } from '../../../../jest/test-helpers';
|
||||||
import LoginPage from '../login_page';
|
import LoginPage from '../login_page';
|
||||||
|
|
||||||
describe('<LoginPage />', () => {
|
describe('<LoginPage />', () => {
|
||||||
it('renders correctly on load', () => {
|
it('renders correctly on load', () => {
|
||||||
const store = {
|
const store = {
|
||||||
instance: ImmutableMap({
|
instance: normalizeInstance({
|
||||||
version: '2.7.2 (compatible; Pleroma 2.3.0)',
|
version: '2.7.2 (compatible; Pleroma 2.3.0)',
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue